mirror of
https://github.com/containers/podman.git
synced 2025-09-11 00:54:42 +08:00
Cirrus: Update Ubuntu images to 21.04
Also simplify `lib.sh` after supporting changes incorporated into automation library 2.x+ (present in all VM and container images). * No need to force-load `/etc/profile` and handle it's expectation to **not** being in `errexit` mode. * Slightly re-arrange loading of automation library files for clarity. * Update comments. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -26,11 +26,11 @@ env:
|
|||||||
####
|
####
|
||||||
FEDORA_NAME: "fedora-34beta"
|
FEDORA_NAME: "fedora-34beta"
|
||||||
PRIOR_FEDORA_NAME: "fedora-33"
|
PRIOR_FEDORA_NAME: "fedora-33"
|
||||||
UBUNTU_NAME: "ubuntu-2010"
|
UBUNTU_NAME: "ubuntu-2104"
|
||||||
PRIOR_UBUNTU_NAME: "ubuntu-2004"
|
PRIOR_UBUNTU_NAME: "ubuntu-2010"
|
||||||
|
|
||||||
# Google-cloud VM Images
|
# Google-cloud VM Images
|
||||||
IMAGE_SUFFIX: "c5032481331085312"
|
IMAGE_SUFFIX: "c6731272010596352"
|
||||||
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
|
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
|
||||||
PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}"
|
PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}"
|
||||||
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}"
|
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}"
|
||||||
|
@ -10,27 +10,17 @@ set -a
|
|||||||
# handling of the (otherwise) default shell setup is non-uniform. Rather
|
# handling of the (otherwise) default shell setup is non-uniform. Rather
|
||||||
# than attempt to workaround differences, simply force-load/set required
|
# than attempt to workaround differences, simply force-load/set required
|
||||||
# items every time this library is utilized.
|
# 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)"
|
USER="$(whoami)"
|
||||||
HOME="$(getent passwd $USER | cut -d : -f 6)"
|
HOME="$(getent passwd $USER | cut -d : -f 6)"
|
||||||
# Some platforms set and make this read-only
|
# Some platforms set and make this read-only
|
||||||
[[ -n "$UID" ]] || \
|
[[ -n "$UID" ]] || \
|
||||||
UID=$(getent passwd $USER | cut -d : -f 3)
|
UID=$(getent passwd $USER | cut -d : -f 3)
|
||||||
if ((_waserrexit)); then set -e; fi
|
|
||||||
|
|
||||||
# During VM Image build, the 'containers/automation' installation
|
# Automation library installed at image-build time,
|
||||||
# was performed. The final step of installation sets the library
|
# defining $AUTOMATION_LIB_PATH in this file.
|
||||||
# location $AUTOMATION_LIB_PATH in /etc/environment or in the
|
if [[ -r "/etc/automation_environment" ]]; then
|
||||||
# default shell profile depending on distribution.
|
source /etc/automation_environment
|
||||||
|
fi
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
if [[ -n "$AUTOMATION_LIB_PATH" ]]; then
|
if [[ -n "$AUTOMATION_LIB_PATH" ]]; then
|
||||||
# shellcheck source=/usr/share/automation/lib/common_lib.sh
|
# shellcheck source=/usr/share/automation/lib/common_lib.sh
|
||||||
@ -43,6 +33,9 @@ else
|
|||||||
) > /dev/stderr
|
) > /dev/stderr
|
||||||
fi
|
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)"
|
OS_RELEASE_ID="$(source /etc/os-release; echo $ID)"
|
||||||
# GCE image-name compatible string representation of distribution _major_ version
|
# GCE image-name compatible string representation of distribution _major_ version
|
||||||
OS_RELEASE_VER="$(source /etc/os-release; echo $VERSION_ID | tr -d '.')"
|
OS_RELEASE_VER="$(source /etc/os-release; echo $VERSION_ID | tr -d '.')"
|
||||||
|
Reference in New Issue
Block a user