summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2020-10-06 14:12:49 -0400
committerChris Evich <cevich@redhat.com>2020-10-07 15:29:43 -0400
commit5b7c64cc97e8bf912c6ab7492827e2b871cb17d1 (patch)
tree8db2ad1cbf5329d4228f8475a2cc8b64ff613acd /contrib
parentae0f65565200df36347513cdb41989ed3f7a2e93 (diff)
downloadpodman-5b7c64cc97e8bf912c6ab7492827e2b871cb17d1.tar.gz
podman-5b7c64cc97e8bf912c6ab7492827e2b871cb17d1.tar.bz2
podman-5b7c64cc97e8bf912c6ab7492827e2b871cb17d1.zip
Cirrus: Fix obtaining a CI VM
Also removed automatic exection of setup_environment.sh since most people using this script are podman developers (not automation/CI folks). If executing the automation scripts is necessary, manual attendance to required variables like `$TEST_FLAVOR` is mandatory. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cirrus/lib.sh3
-rwxr-xr-xcontrib/cirrus/runner.sh3
-rwxr-xr-xcontrib/cirrus/setup_environment.sh7
3 files changed, 9 insertions, 4 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh
index 79d3b338b..e5124d8e4 100644
--- a/contrib/cirrus/lib.sh
+++ b/contrib/cirrus/lib.sh
@@ -45,6 +45,9 @@ OS_RELEASE_ID="$(source /etc/os-release; echo $ID)"
OS_RELEASE_VER="$(source /etc/os-release; echo $VERSION_ID | cut -d '.' -f 1)"
# Combined to ease soe usage
OS_REL_VER="${OS_RELEASE_ID}-${OS_RELEASE_VER}"
+# This is normally set from .cirrus.yml but default is necessary when
+# running under hack/get_ci_vm.sh since it cannot infer the value.
+DISTRO_NV="${DISTRO_NV:-$OS_REL_VER}"
# Essential default paths, many are overridden when executing under Cirrus-CI
GOPATH="${GOPATH:-/var/tmp/go}"
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh
index 8a85acbd1..bfac8e7cb 100755
--- a/contrib/cirrus/runner.sh
+++ b/contrib/cirrus/runner.sh
@@ -139,6 +139,9 @@ function _run_vendor() {
}
function _run_build() {
+ # Ensure always start from clean-slate with all vendor modules downloaded
+ make clean
+ make vendor
make podman-release
make podman-remote-linux-release
}
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index c064b6840..156c9b7b2 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -67,9 +67,8 @@ case "$CG_FS_TYPE" in
*) die_unknown CG_FS_TYPE
esac
-# Required to be defined by caller: Which distribution are we testing on
-# shellcheck disable=SC2154
-case "$DISTRO_NV" in
+# Which distribution are we testing on.
+case "$OS_RELEASE_ID" in
ubuntu*) ;;
fedora*)
if ((CONTAINER==0)); then # Not yet running inside a container
@@ -83,7 +82,7 @@ case "$DISTRO_NV" in
setsebool container_manage_cgroup true
fi
;;
- *) die_unknown DISTRO_NV
+ *) die_unknown OS_RELEASE_ID
esac
# Required to be defined by caller: The environment where primary testing happens