make SITES_TO_SKIP configurable from env

* Read SITES_TO_SKIP from env, so that treasuremap can
  set its own list of sites to be skipped in the environment
  variable

Change-Id: I14507b77cfcb348d310156fac22a1ec39dba0731
This commit is contained in:
Siraj Yasin 2021-09-29 16:23:03 +00:00
parent ff3d6f84a2
commit 23ccec608c

View File

@ -25,6 +25,8 @@ set -o pipefail
: ${MANIFEST_PATH:="manifests/site"} : ${MANIFEST_PATH:="manifests/site"}
: ${SITE_ROOTS:="$(basename "${PWD}")/${MANIFEST_PATH}"} : ${SITE_ROOTS:="$(basename "${PWD}")/${MANIFEST_PATH}"}
: ${MANIFEST_REPO_URL:="https://review.opendev.org/airship/airshipctl"} : ${MANIFEST_REPO_URL:="https://review.opendev.org/airship/airshipctl"}
: ${SITES_TO_SKIP:="az-test-site docker-test-site openstack-test-site"}
# Name of specific site to be validated # Name of specific site to be validated
SITE=${SITE:-$1} SITE=${SITE:-$1}
@ -66,7 +68,7 @@ for site_root in ${SITE_ROOTS}; do
for site in $(ls ${MANIFEST_ROOT}/${site_root}); do for site in $(ls ${MANIFEST_ROOT}/${site_root}); do
# TODO (raliev) remove this condition later # TODO (raliev) remove this condition later
# Temporary solution to disable validation for outdated sites, this list will be removed eventually # Temporary solution to disable validation for outdated sites, this list will be removed eventually
sites_to_skip=(az-test-site docker-test-site openstack-test-site) sites_to_skip=(${SITES_TO_SKIP})
if [[ " ${sites_to_skip[@]} " =~ " ${site} " ]]; then if [[ " ${sites_to_skip[@]} " =~ " ${site} " ]]; then
continue continue
fi fi