From 5b7c64cc97e8bf912c6ab7492827e2b871cb17d1 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Tue, 6 Oct 2020 14:12:49 -0400 Subject: 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 --- contrib/cirrus/lib.sh | 3 +++ contrib/cirrus/runner.sh | 3 +++ contrib/cirrus/setup_environment.sh | 7 +++---- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'contrib') 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 -- cgit v1.2.3-54-g00ecf