From 77f0b32e5a265674412b60c3ce8a1fcf62d5f096 Mon Sep 17 00:00:00 2001 From: Ruslan Aliev Date: Thu, 3 Jun 2021 21:45:34 -0500 Subject: [PATCH] Enable static validation for all available plans per site Change-Id: I82e7d8f0fbe03e3d9e8d18c5a14e8ad9dad944e3 Signed-off-by: Ruslan Aliev Closes: #562 --- .../test-site/ephemeral/bootstrap/baremetalhost.yaml | 6 ++++++ .../site/test-site/phases/validation-config.yaml | 10 +++++++++- tools/validate_docs | 12 ++++-------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/manifests/site/test-site/ephemeral/bootstrap/baremetalhost.yaml b/manifests/site/test-site/ephemeral/bootstrap/baremetalhost.yaml index 7d8282cc8..20593058b 100644 --- a/manifests/site/test-site/ephemeral/bootstrap/baremetalhost.yaml +++ b/manifests/site/test-site/ephemeral/bootstrap/baremetalhost.yaml @@ -18,3 +18,9 @@ status: # when we have more flexible labeling system in place, we will not # deliver this document to ephemeral cluster state: externally provisioned + ID: "" + operationHistory: {} + errorMessage: "" + hardwareProfile: "" + operationalStatus: "" + poweredOn: false diff --git a/manifests/site/test-site/phases/validation-config.yaml b/manifests/site/test-site/phases/validation-config.yaml index eb8a06292..01d60d52f 100755 --- a/manifests/site/test-site/phases/validation-config.yaml +++ b/manifests/site/test-site/phases/validation-config.yaml @@ -10,13 +10,21 @@ siteConfig: ignoreMissingSchemas: false planName: AIRSHIPCTL_CURRENT_PLAN planConfigs: - phasePlan: + deploy-gating: kindsToSkip: - Clusterctl - VariableCatalogue crdList: - function/airshipctl-schemas/airshipit.org_versionscatalogues.yaml - function/airshipctl-schemas/airshipit.org_networkcatalogues.yaml + iso: + kindsToSkip: + - VariableCatalogue + - RemoteDirectConfiguration + crdList: + - function/airshipctl-schemas/airshipit.org_versionscatalogues.yaml + - function/airshipctl-schemas/airshipit.org_networkcatalogues.yaml + - global/crd/baremetal-operator/metal3.io_baremetalhosts_crd.yaml phaseName: AIRSHIPCTL_CURRENT_PHASE phaseConfigs: initinfra-ephemeral: diff --git a/tools/validate_docs b/tools/validate_docs index d1fb0d27c..5669c0d38 100755 --- a/tools/validate_docs +++ b/tools/validate_docs @@ -27,7 +27,7 @@ set -o pipefail : ${MANIFEST_REPO_URL:="https://review.opendev.org/airship/airshipctl"} # Name of specific site to be validated -SITE_NAME=${SITE_NAME:-$1} +SITE=${SITE:-$1} TMP=$(mktemp -d) # TODO: use `airshipctl config` to do this once all the needed knobs are exposed @@ -72,7 +72,7 @@ for site_root in ${SITE_ROOTS}; do fi # Validate only specific site if set - if [ ! -z "$SITE_NAME" ] && [ "$site" != "$SITE_NAME" ]; then + if [ ! -z "$SITE" ] && [ "$site" != "$SITE" ]; then continue fi @@ -80,12 +80,8 @@ for site_root in ${SITE_ROOTS}; do generate_airshipconf $site phase_plans=$(airshipctl --airshipconf "${TMP}/$site.cfg" plan list | awk -F'/' '/PhasePlan/ {print $2}' | awk '{print $1}') for plan in $phase_plans; do - # Perform static validation, add support of all plans later - # TODO (raliev) remove this condition later - if [ "$plan" = "phasePlan" ]; then - airshipctl --airshipconf "${TMP}/$site.cfg" plan validate $plan - echo "Validation of site ${site} is successful!" - fi + airshipctl --airshipconf "${TMP}/$site.cfg" plan validate $plan done + echo "Validation of site ${site} is successful!" done done