diff options
author | Chris Evich <cevich@redhat.com> | 2022-09-14 14:39:19 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2022-09-29 13:06:01 -0400 |
commit | 0660f5b7a44ed12be8365bbca1f0e0018d742bb9 (patch) | |
tree | 5991542ea049916677a298ec7e9ea62a70aff5c4 /contrib/cirrus/prebuild.sh | |
parent | 6c8a11b7460217d765611339e7df831582b2c250 (diff) | |
download | podman-0660f5b7a44ed12be8365bbca1f0e0018d742bb9.tar.gz podman-0660f5b7a44ed12be8365bbca1f0e0018d742bb9.tar.bz2 podman-0660f5b7a44ed12be8365bbca1f0e0018d742bb9.zip |
Cirrus: Combine build and code consistency tasks
It's conceivable for CI to spend a lot of time testing code which
otherwise should be rejected due to quality problems. Previously this
was validated in a dedicated task, however a failure would still fail
the CI run. Simplify the number of CI tasks by combining the consistency
check at the tail-end of the build task.
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/prebuild.sh')
-rwxr-xr-x | contrib/cirrus/prebuild.sh | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/contrib/cirrus/prebuild.sh b/contrib/cirrus/prebuild.sh index 7695128de..ea05d90dc 100755 --- a/contrib/cirrus/prebuild.sh +++ b/contrib/cirrus/prebuild.sh @@ -17,26 +17,27 @@ req_env_vars CI DEST_BRANCH IMAGE_SUFFIX TEST_FLAVOR TEST_ENVIRON \ SCRIPT_BASE CIRRUS_WORKING_DIR FEDORA_NAME UBUNTU_NAME \ VM_IMAGE_NAME -# There's no need to perform further checks on more than one -# CI platform. These variables are defined in .cirrus.yml +# Defined by the CI system # shellcheck disable=SC2154 -if [[ ! "${DISTRO_NV}" =~ ${FEDORA_NAME} ]]; then - echo "Skipping additional checks on $DISTRO_NV" - exit 0 -fi +cd $CIRRUS_WORKING_DIR +# Defined by CI config. # shellcheck disable=SC2154 -$SCRIPT_BASE/cirrus_yaml_test.py - -ooe.sh dnf install -y ShellCheck # small/quick addition +showrun $SCRIPT_BASE/cirrus_yaml_test.py -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 +# Defined by CI config. +# shellcheck disable=SC2154 +if [[ "${DISTRO_NV}" =~ fedora ]]; then + 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 +fi +msg "Checking 3rd party network service connectivity" # shellcheck disable=SC2154 cat ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/required_host_ports.txt | \ while read host port @@ -66,9 +67,11 @@ TEST_IMGS=(\ cirros:latest ) -echo "Checking quay.io test image accessibility" +msg "Checking quay.io test image accessibility" for testimg in "${TEST_IMGS[@]}"; do fqin="quay.io/libpod/$testimg" echo " $fqin" + # Belt-and-suspenders: Catch skopeo (somehow) returning False or null + # in addition to "bad" (invalid) JSON. skopeo inspect --retry-times 5 "docker://$fqin" | jq -e . > /dev/null done |