summaryrefslogtreecommitdiff
path: root/contrib/cirrus/update_meta.sh
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-13 08:39:00 +0100
committerGitHub <noreply@github.com>2020-01-13 08:39:00 +0100
commitc7d3b59da4b90b591a162b4e6cef21663b15f279 (patch)
treea4873a2f3852dc55dc0bd5f6cf9509fbb66d7f06 /contrib/cirrus/update_meta.sh
parentaa554d7ba250390ac2383165edecc27f37a07896 (diff)
parent49be255feee026d6818a205c30478d28f81c0045 (diff)
downloadpodman-c7d3b59da4b90b591a162b4e6cef21663b15f279.tar.gz
podman-c7d3b59da4b90b591a162b4e6cef21663b15f279.tar.bz2
podman-c7d3b59da4b90b591a162b4e6cef21663b15f279.zip
Merge pull request #4836 from cevich/upd_base_meta
Cirrus: Fix libpod base images going stale
Diffstat (limited to 'contrib/cirrus/update_meta.sh')
-rwxr-xr-xcontrib/cirrus/update_meta.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/cirrus/update_meta.sh b/contrib/cirrus/update_meta.sh
new file mode 100755
index 000000000..618cd670c
--- /dev/null
+++ b/contrib/cirrus/update_meta.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+source $(dirname $0)/lib.sh
+
+# N/B: This script is expected to wrap $ENTRYPOINT when executing under the
+# 'meta' Cirrus task on the libpod repo.
+ENTRYPOINT=/usr/local/bin/entrypoint.sh
+
+req_env_var IMGNAMES BUILDID REPOREF GCPJSON GCPNAME GCPPROJECT CIRRUS_CI
+
+[[ -x "$ENTRYPOINT" ]] || \
+ die 2 "Expecting to find an installed entrypoint script $ENTRYPOINT."
+
+# A better way of checking isn't compatible with old but functional images
+# in-use by other repos.
+grep -q 'compute images update' "$ENTRYPOINT" || \
+ die 3 "Expecting to be running inside a specific imgts container image"
+
+canonicalize_image_names
+
+# Executing inside a container; proper hand-off for process control
+exec $ENTRYPOINT