summaryrefslogtreecommitdiff
path: root/contrib/cirrus
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2022-07-12 08:28:21 -0600
committerMatthew Heon <matthew.heon@pm.me>2022-07-26 13:04:19 -0400
commitca4630ede6d50e3417502a7d31ef60576f371b8c (patch)
tree3d15a3fad104473977ac31eb537499e312a9484c /contrib/cirrus
parentbf269e634caee2022e99189de8337bd7fcd8f0e7 (diff)
downloadpodman-ca4630ede6d50e3417502a7d31ef60576f371b8c.tar.gz
podman-ca4630ede6d50e3417502a7d31ef60576f371b8c.tar.bz2
podman-ca4630ede6d50e3417502a7d31ef60576f371b8c.zip
CI: sanity check for desired runtime
We're still not testing runc in CI (#14833), and it may be weeks or months before we can, due to criu/glibc nightmare, but one day we'll be back on track, then later on we'll update VMs again, and screw it up, and lose runc, and not notice, and RHEL will break, and oh noes headless chicken again, repeat repeat. We can do better. Use .cirrus.yml to explicitly define which VMs should use which runtimes, and enforce it early in the CI build step. This should never fail (uh huh) in a PR, only in one of the update-VM PRs. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'contrib/cirrus')
-rwxr-xr-xcontrib/cirrus/runner.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh
index 762a3b501..32f66bac2 100755
--- a/contrib/cirrus/runner.sh
+++ b/contrib/cirrus/runner.sh
@@ -236,6 +236,16 @@ function _run_build() {
make clean
make vendor
make podman-release # includes podman, podman-remote, and docs
+
+ # Last-minute confirmation that we're testing the desired runtime.
+ # This Can't Possibly Failâ„¢ in regular CI; only when updating VMs.
+ # $CI_DESIRED_RUNTIME must be defined in .cirrus.yml.
+ req_env_vars CI_DESIRED_RUNTIME
+ runtime=$(bin/podman info --format '{{.Host.OCIRuntime.Name}}')
+ # shellcheck disable=SC2154
+ if [[ "$runtime" != "$CI_DESIRED_RUNTIME" ]]; then
+ die "Built podman is using '$runtime'; this CI environment requires $CI_DESIRED_RUNTIME"
+ fi
}
function _run_altbuild() {