mirror of
https://github.com/containers/podman.git
synced 2026-07-10 15:25:00 -04:00
Move the Cirrus validate-source_task to a GitHub Actions workflow
(.github/workflows/ci.yml) running as a single job on the CNCF-hosted
runner. The job runs the same stages: make validate-source,
tests-included, and the conditional renovate config check.
golangci-lint for FreeBSD and macOS now runs cross-compiled (GOOS) on
the native Linux runner instead of on dedicated Cirrus VMs/workers, so
the lint steps are dropped from osx_alt_build and freebsd_alt_build.
The PR helper scripts are de-Cirrus'd: they read CI-neutral env vars
(PR_HEAD, PR_NUMBER, PR_BODY) and the "No New Tests" label override is
now handled natively in the workflow instead of via a GraphQL query.
The shared clone/setup/main YAML anchors are relocated into build_task,
and the dead _run_validate-source runner.sh function is removed.
The tests-of-tests (.t files) are fixed for new setup (mostly removing
test cases which are now obsoleted, like [CI:DOCS] and [NO NEW TESTS]
markers. NOTE we still don't run tests in CI (although we could), but
I ran them locally and fixed all the issues.
Finally, test-jira-links-included is removed as it is RHEL-branch
specific and have no place in the new repo.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 6e597af6dc)
[fixed merge commit]
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
79 lines
2.6 KiB
Bash
Executable File
79 lines
2.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eo pipefail
|
|
|
|
# This script attempts to confirm functional networking and
|
|
# connectivity to essential external servers. It also verifies
|
|
# some basic environmental expectations and shell-script sanity.
|
|
# It's intended for use early on in the podman CI system, to help
|
|
# 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
|
|
# shellcheck source=hack/ci/lib.sh
|
|
source $(dirname $0)/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 \
|
|
SCRIPT_BASE CIRRUS_WORKING_DIR FEDORA_NAME \
|
|
VM_IMAGE_NAME
|
|
|
|
# Defined by the CI system
|
|
# 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
|
|
|
|
msg "Checking for leading tabs in system tests"
|
|
if grep -n ^$'\t' test/system/*; then
|
|
die "Found leading tabs in system tests. Use spaces to indent, not tabs."
|
|
fi
|
|
|
|
# Lookup 'env' dict. string value from key specified as argument from YAML file.
|
|
get_env_key() {
|
|
local yaml
|
|
local script
|
|
|
|
yaml="$CIRRUS_WORKING_DIR/.github/workflows/scan-secrets.yml"
|
|
script="from yaml import safe_load; print(safe_load(open('$yaml'))['env']['$1'])"
|
|
python -c "$script"
|
|
}
|
|
|
|
# Only need to check CI-stuffs on a single build-task, there's
|
|
# generally one latest fedora task so use that one. In some cases
|
|
# when we have to drop testing for the prior fedora task we may
|
|
# run twice on current fedora but this is not a problem.
|
|
# Envars all defined by CI config.
|
|
# shellcheck disable=SC2154
|
|
if [[ "${DISTRO_NV}" == "$FEDORA_NAME" ]]; then
|
|
msg "Checking shell scripts"
|
|
showrun shellcheck --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 \
|
|
./.github/actions/check_cirrus_cron/* \
|
|
hack/get_ci_vm.sh
|
|
|
|
# Tests for lib.sh
|
|
showrun ${SCRIPT_BASE}/lib.sh.t
|
|
|
|
|
|
# Run this during daily cron job to prevent a GraphQL API change/breakage
|
|
# from impacting every PR. Down-side being if it does fail, a maintainer
|
|
# will need to do some archaeology to find it.
|
|
# Defined by CI system
|
|
# shellcheck disable=SC2154
|
|
if [[ "$CIRRUS_CRON" == "main" ]]; then
|
|
export PREBUILD=1
|
|
showrun bash ${CIRRUS_WORKING_DIR}/.github/actions/check_cirrus_cron/test.sh
|
|
fi
|
|
fi
|