summaryrefslogtreecommitdiff
path: root/contrib/cirrus
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-27 16:44:31 -0400
committerGitHub <noreply@github.com>2021-04-27 16:44:31 -0400
commitdbc13f3dac4fa4095ae5db86085e5711a701eb7b (patch)
tree5ddb4014665f1fbdebd8c3e91c45647178298dc7 /contrib/cirrus
parentba9c1f3f17a4f0086d9ac25fe0f211b3c75e514a (diff)
parent0a08216990dc650ac0eb799b8923ba96aab049d0 (diff)
downloadpodman-dbc13f3dac4fa4095ae5db86085e5711a701eb7b.tar.gz
podman-dbc13f3dac4fa4095ae5db86085e5711a701eb7b.tar.bz2
podman-dbc13f3dac4fa4095ae5db86085e5711a701eb7b.zip
Merge pull request #10137 from cevich/update_ubuntu_2104
Cirrus: Update Ubuntu images to 21.04
Diffstat (limited to 'contrib/cirrus')
-rw-r--r--contrib/cirrus/lib.sh23
1 files changed, 8 insertions, 15 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh
index 2cd28e34a..16eb6735a 100644
--- a/contrib/cirrus/lib.sh
+++ b/contrib/cirrus/lib.sh
@@ -10,27 +10,17 @@ set -a
# handling of the (otherwise) default shell setup is non-uniform. Rather
# than attempt to workaround differences, simply force-load/set required
# items every time this library is utilized.
-_waserrexit=0
-if [[ "$SHELLOPTS" =~ errexit ]]; then _waserrexit=1; fi
-set +e # Assumed in F33 for setting global vars
-if [[ -r "/etc/automation_environment" ]]; then
- source /etc/automation_environment
-else # prior to automation library v2.0, this was necessary
- source /etc/profile
- source /etc/environment
-fi
-if [[ -r "/etc/ci_environment" ]]; then source /etc/ci_environment; fi
USER="$(whoami)"
HOME="$(getent passwd $USER | cut -d : -f 6)"
# Some platforms set and make this read-only
[[ -n "$UID" ]] || \
UID=$(getent passwd $USER | cut -d : -f 3)
-if ((_waserrexit)); then set -e; fi
-# During VM Image build, the 'containers/automation' installation
-# was performed. The final step of installation sets the library
-# location $AUTOMATION_LIB_PATH in /etc/environment or in the
-# default shell profile depending on distribution.
+# Automation library installed at image-build time,
+# defining $AUTOMATION_LIB_PATH in this file.
+if [[ -r "/etc/automation_environment" ]]; then
+ source /etc/automation_environment
+fi
# shellcheck disable=SC2154
if [[ -n "$AUTOMATION_LIB_PATH" ]]; then
# shellcheck source=/usr/share/automation/lib/common_lib.sh
@@ -43,6 +33,9 @@ else
) > /dev/stderr
fi
+# Managed by setup_environment.sh; holds task-specific definitions.
+if [[ -r "/etc/ci_environment" ]]; then source /etc/ci_environment; fi
+
OS_RELEASE_ID="$(source /etc/os-release; echo $ID)"
# GCE image-name compatible string representation of distribution _major_ version
OS_RELEASE_VER="$(source /etc/os-release; echo $VERSION_ID | tr -d '.')"