Merge pull request #16414 from cevich/fix_cirrus_cron_jobs

[CI:BUILD] Fix cirrus cirrus-cron GHA workflow scripts, add checks, and tests
This commit is contained in:
OpenShift Merge Robot
2022-11-10 17:16:38 +00:00
committed by GitHub
8 changed files with 158 additions and 24 deletions

View File

@@ -9,8 +9,10 @@ set -eo pipefail
# prevent wasting time on tests that can't succeed due to some
# outage, failure, or missed expectation.
set -a
source /etc/automation_environment
source $AUTOMATION_LIB_PATH/common_lib.sh
set +a
req_env_vars CI DEST_BRANCH IMAGE_SUFFIX TEST_FLAVOR TEST_ENVIRON \
PODBIN_NAME PRIV_NAME DISTRO_NV AUTOMATION_LIB_PATH \
@@ -21,6 +23,7 @@ req_env_vars CI DEST_BRANCH IMAGE_SUFFIX TEST_FLAVOR TEST_ENVIRON \
# shellcheck disable=SC2154
cd $CIRRUS_WORKING_DIR
msg "Checking Cirrus YAML"
# Defined by CI config.
# shellcheck disable=SC2154
showrun $SCRIPT_BASE/cirrus_yaml_test.py
@@ -28,13 +31,19 @@ showrun $SCRIPT_BASE/cirrus_yaml_test.py
# Defined by CI config.
# shellcheck disable=SC2154
if [[ "${DISTRO_NV}" =~ fedora ]]; then
msg "Checking shell scripts"
showrun ooe.sh dnf install -y ShellCheck # small/quick addition
showrun shellcheck --color=always --format=tty \
--shell=bash --external-sources \
--enable add-default-case,avoid-nullary-conditions,check-unassigned-uppercase \
--exclude SC2046,SC2034,SC2090,SC2064 \
--wiki-link-count=0 --severity=warning \
$SCRIPT_BASE/*.sh hack/get_ci_vm.sh
$SCRIPT_BASE/*.sh \
./.github/actions/check_cirrus_cron/* \
hack/get_ci_vm.sh
export PREBUILD=1
showrun bash ${CIRRUS_WORKING_DIR}/.github/actions/check_cirrus_cron/test.sh
fi
msg "Checking 3rd party network service connectivity"