Skip to content

Commit

Permalink
Cirrus: Replace Ubuntu -> Debian SID
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed Feb 20, 2023
1 parent 5a63d7f commit e4eb70a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 36 deletions.
23 changes: 12 additions & 11 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ env:
IMAGE_PROJECT: "libpod-218412"
FEDORA_NAME: "fedora-37"
PRIOR_FEDORA_NAME: "fedora-36"
UBUNTU_NAME: "ubuntu-2204"
DEBIAN_NAME: "debian-12"

IMAGE_SUFFIX: "c6300530360713216"
# Image identifiers
IMAGE_SUFFIX: "c20230215t175929z-f37f36d12"
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}"
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}"
DEBIAN_CACHE_IMAGE_NAME: "debian-${IMAGE_SUFFIX}"

IN_PODMAN_IMAGE: "quay.io/libpod/fedora_podman:${IMAGE_SUFFIX}"

Expand Down Expand Up @@ -75,7 +76,7 @@ meta_task:
IMGNAMES: |-
${FEDORA_CACHE_IMAGE_NAME}
${PRIOR_FEDORA_CACHE_IMAGE_NAME}
${UBUNTU_CACHE_IMAGE_NAME}
${DEBIAN_CACHE_IMAGE_NAME}
build-push-${IMAGE_SUFFIX}
BUILDID: "${CIRRUS_BUILD_ID}"
REPOREF: "${CIRRUS_CHANGE_IN_REPO}"
Expand Down Expand Up @@ -189,7 +190,7 @@ conformance_task:
depends_on: *smoke_vendor_cross

gce_instance:
image_name: "${UBUNTU_CACHE_IMAGE_NAME}"
image_name: "${DEBIAN_CACHE_IMAGE_NAME}"

timeout_in: 25m

Expand Down Expand Up @@ -220,8 +221,8 @@ integration_task:
IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'vfs'
- env:
DISTRO_NV: "${UBUNTU_NAME}"
IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}"
DISTRO_NV: "${DEBIAN_NAME}"
IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'vfs'
# OVERLAY
- env:
Expand All @@ -233,8 +234,8 @@ integration_task:
IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
- env:
DISTRO_NV: "${UBUNTU_NAME}"
IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}"
DISTRO_NV: "${DEBIAN_NAME}"
IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'

gce_instance:
Expand Down Expand Up @@ -278,8 +279,8 @@ integration_rootless_task:
STORAGE_DRIVER: 'overlay'
PRIV_NAME: rootless
- env:
DISTRO_NV: "${UBUNTU_NAME}"
IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}"
DISTRO_NV: "${DEBIAN_NAME}"
IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
PRIV_NAME: rootless

Expand Down
11 changes: 2 additions & 9 deletions contrib/cirrus/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ PACKAGE_DOWNLOAD_DIR=/var/cache/download
lilto() { err_retry 8 1000 "" "$@"; } # just over 4 minutes max
bigto() { err_retry 7 5670 "" "$@"; } # 12 minutes max

# Working with apt under Debian/Ubuntu automation is a PITA, make it easy
# Working with apt under automation is a PITA, make it easy
# Avoid some ways of getting stuck waiting for user input
export DEBIAN_FRONTEND=noninteractive
# Short-cut for frequently used base command
Expand Down Expand Up @@ -127,7 +127,7 @@ remove_packaged_buildah_files() {
warn "Removing packaged buildah files to prevent conflicts with source build and testing."
req_env_vars OS_RELEASE_ID

if [[ "$OS_RELEASE_ID" =~ "ubuntu" ]]
if [[ "$OS_RELEASE_ID" =~ "debian" ]]
then
LISTING_CMD="dpkg-query -L buildah"
else
Expand All @@ -139,13 +139,6 @@ remove_packaged_buildah_files() {
do
# Sub-directories may contain unrelated/valuable stuff
if [[ -d "$fullpath" ]]; then continue; fi
# As of Ubuntu 2010, policy.json in buildah, not containers-common package
if [[ "$OS_RELEASE_ID" == "ubuntu" ]] && \
grep -q '/etc/containers'<<<"$fullpath"; then

warn "Not removing $fullpath (from buildah package)"
continue
fi

rm -vf "$fullpath"
done
Expand Down
6 changes: 3 additions & 3 deletions contrib/cirrus/logcollector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ req_env_vars CI GOSRC OS_RELEASE_ID
case $1 in
audit)
case $OS_RELEASE_ID in
ubuntu) showrun cat /var/log/kern.log ;;
debian) showrun cat /var/log/kern.log ;;
fedora) showrun cat /var/log/audit/audit.log ;;
*) bad_os_id_ver ;;
esac
Expand All @@ -21,7 +21,7 @@ case $1 in
buildah_info) showrun $GOSRC/bin/buildah info;;
golang) showrun go version;;
packages)
# These names are common to Fedora and Ubuntu
# These names are common to Fedora and Debian
PKG_NAMES=(\
buildah
conmon
Expand All @@ -44,7 +44,7 @@ case $1 in
fi
PKG_LST_CMD='rpm -q --qf=%{N}-%{V}-%{R}-%{ARCH}\n'
;;
ubuntu*)
debian*)
PKG_LST_CMD='dpkg-query --show --showformat=${Package}-${Version}-${Architecture}\n'
;;
*) bad_os_id_ver ;;
Expand Down
15 changes: 3 additions & 12 deletions contrib/cirrus/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,12 @@ EOF
showrun setsebool -P container_manage_cgroup true
fi
;;
ubuntu)
debian)
if [[ "$1" == "conformance" ]]; then
msg "Installing previously downloaded/cached packages"
ooe.sh dpkg -i \
msg "Installing previously downloaded/cached Docker packages"
dpkg -i \
$PACKAGE_DOWNLOAD_DIR/containerd.io*.deb \
$PACKAGE_DOWNLOAD_DIR/docker-ce*.deb

# At the time of this comment, Ubuntu is using systemd-resolved
# which interfears badly with conformance testing. Some tests
# need to run dnsmasq on port 53.
if [[ -r "/run/systemd/resolve/resolv.conf" ]]; then
msg "Disabling systemd-resolved service"
systemctl stop systemd-resolved.service
cp /run/systemd/resolve/resolv.conf /etc/
fi
fi
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion contrib/cirrus/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ else
# This test compares images built with the "latest" version
# of docker, against images built with buildah. Runtime installs
# are required to ensure the latest docker version is used.
[[ "$OS_RELEASE_ID" == "ubuntu" ]] || \
[[ "$OS_RELEASE_ID" == "debian" ]] || \
bad_os_id_ver

systemctl enable --now docker
Expand Down

0 comments on commit e4eb70a

Please sign in to comment.