summaryrefslogtreecommitdiff
path: root/contrib/cirrus/setup_environment.sh
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-04-30 13:09:32 -0400
committerChris Evich <cevich@redhat.com>2019-05-21 08:44:02 -0400
commit95141f88d4e6f994c2972a63be19c82ef759ea5b (patch)
treef177ca42941649f7a88921f3d15b52bf8c8eb2ee /contrib/cirrus/setup_environment.sh
parentc4d9b03f7800e37df0a8821b450932700aac3c5d (diff)
downloadpodman-95141f88d4e6f994c2972a63be19c82ef759ea5b.tar.gz
podman-95141f88d4e6f994c2972a63be19c82ef759ea5b.tar.bz2
podman-95141f88d4e6f994c2972a63be19c82ef759ea5b.zip
Cirrus: fixups based on review feedback
Also remove disused distros (RHEL/CentOS/FAH) and fix get_ci_vm script Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/setup_environment.sh')
-rwxr-xr-xcontrib/cirrus/setup_environment.sh32
1 files changed, 19 insertions, 13 deletions
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index 5fc90d61d..447f4f310 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -12,15 +12,11 @@ exithandler() {
RET=$?
set +e
show_env_vars
- record_timestamp "env. setup end"
echo "$(basename $0) exit status: $RET"
[[ "$RET" -eq "0" ]] && date +%s >> "SETUP_MARKER_FILEPATH"
}
trap exithandler EXIT
-# Must be bash, always bash
-[[ "$SHELL" =~ "bash" ]] || chsh -s /bin/bash
-
# Verify basic dependencies
for depbin in go rsync unzip sha256sum curl make python3 git
do
@@ -39,8 +35,10 @@ case "${OS_REL_VER}" in
ubuntu-18) ;;
fedora-29) ;;
fedora-28) ;;
- centos-7) ;;
- rhel-7) ;;
+ centos-7) # Current VM is an image-builder-image no local podman/testing
+ echo "No further setup required for VM image building"
+ exit 0
+ ;;
*) bad_os_id_ver ;;
esac
@@ -59,19 +57,27 @@ sudo install -D -m 755 $GOSRC/test/registries.conf \
# cri-o if installed will mess with testing in non-obvious ways
rm -f /etc/cni/net.d/*cri*
-go get github.com/onsi/ginkgo/ginkgo
-go get github.com/onsi/gomega/...
+make install.tools
case "$SPECIALMODE" in
+ none) ;; # Do the normal thing
rootless)
- X=$(echo "export ROOTLESS_USER='some${RANDOM}dude'" | \
- tee -a "$HOME/$ENVLIB") && eval "$X" && echo "$X"
- X=$(echo "export SPECIALMODE='$SPECIALMODE'"| \
- tee -a "$HOME/$ENVLIB") && eval "$X" && echo "$X"
- setup_rootless
+ # Only do this once, even if ROOTLESS_USER (somehow) changes
+ if ! grep -q 'ROOTLESS_USER' /etc/environment
+ then
+ X=$(echo "export ROOTLESS_USER='${ROOTLESS_USER:-some${RANDOM}dude}'" | \
+ tee -a /etc/environment) && eval "$X" && echo "$X"
+ X=$(echo "export SPECIALMODE='${SPECIALMODE}'" | \
+ tee -a /etc/environment) && eval "$X" && echo "$X"
+ X=$(echo "export TEST_REMOTE_CLIENT='${TEST_REMOTE_CLIENT}'" | \
+ tee -a /etc/environment) && eval "$X" && echo "$X"
+ setup_rootless
+ fi
;;
in_podman) # Assumed to be Fedora
dnf install -y podman buildah
$SCRIPT_BASE/setup_container_environment.sh
;;
+ *)
+ die 111 "Unsupported \$SPECIAL_MODE: $SPECIALMODE"
esac