summaryrefslogtreecommitdiff
path: root/contrib/cirrus
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cirrus')
-rw-r--r--contrib/cirrus/cron-fail_addrs.csv1
-rwxr-xr-xcontrib/cirrus/runner.sh5
-rwxr-xr-xcontrib/cirrus/setup_environment.sh49
3 files changed, 44 insertions, 11 deletions
diff --git a/contrib/cirrus/cron-fail_addrs.csv b/contrib/cirrus/cron-fail_addrs.csv
deleted file mode 100644
index 276158163..000000000
--- a/contrib/cirrus/cron-fail_addrs.csv
+++ /dev/null
@@ -1 +0,0 @@
-rh.container.bot@gmail.com,podman-monitor@lists.podman.io
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh
index c52fd9216..6376bafa2 100755
--- a/contrib/cirrus/runner.sh
+++ b/contrib/cirrus/runner.sh
@@ -12,7 +12,7 @@ set -eo pipefail
# most notably:
#
# PODBIN_NAME : "podman" (i.e. local) or "remote"
-# TEST_ENVIRON : 'host' or 'container'; desired environment in which to run
+# TEST_ENVIRON : 'host', 'host-netavark', or 'container'; desired environment in which to run
# CONTAINER : 1 if *currently* running inside a container, 0 if host
#
@@ -233,8 +233,7 @@ function _run_altbuild() {
make build-no-cgo
;;
*RPM*)
- make -f ./.copr/Makefile
- rpmbuild --rebuild ./podman-*.src.rpm
+ make package
;;
Alt*Cross)
arches=(\
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index 03b954a5b..72afcf9bf 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -130,7 +130,7 @@ esac
# Required to be defined by caller: The environment where primary testing happens
# shellcheck disable=SC2154
case "$TEST_ENVIRON" in
- host)
+ host*)
# The e2e tests wrongly guess `--cgroup-manager` option
# shellcheck disable=SC2154
if [[ "$CG_FS_TYPE" == "cgroup2fs" ]] || [[ "$PRIV_NAME" == "root" ]]
@@ -141,6 +141,41 @@ case "$TEST_ENVIRON" in
warn "Forcing CGROUP_MANAGER=cgroupfs"
echo "CGROUP_MANAGER=cgroupfs" >> /etc/ci_environment
fi
+ # TODO: For the foreseeable future, need to support running tests
+ # with and without the latest netavark/aardvark. Once they're more
+ # stable and widely supported in Fedora, they can be pre-installed
+ # from its RPM at VM image build-time.
+ if [[ "$TEST_ENVIRON" =~ netavark ]]; then
+ for info in "netavark $NETAVARK_BRANCH $NETAVARK_URL $NETAVARK_DEBUG" \
+ "aardvark-dns $AARDVARK_BRANCH $AARDVARK_URL $AARDVARK_DEBUG"; do
+
+ read _name _branch _url _debug <<<"$info"
+ req_env_vars _name _branch _url _debug
+ msg "Downloading latest $_name from upstream branch '$_branch'"
+ # Use identifiable archive filename in of a get_ci_env.sh environment
+ curl --fail --location -o /tmp/$_name.zip "$_url"
+
+ # Needs to be in a specific location
+ # ref: https://github.com/containers/common/blob/main/pkg/config/config_linux.go#L39
+ _pdir=/usr/local/libexec/podman
+ mkdir -p $_pdir
+ cd $_pdir
+ msg "$PWD"
+ unzip /tmp/$_name.zip
+ if ((_debug)); then
+ warn "Using debug $_name binary"
+ mv $_name.debug $_name
+ else
+ rm $_name.debug
+ fi
+ chmod 0755 $_pdir/$_name
+ cd -
+ done
+
+ restorecon -F -v $_nvdir
+ msg "Forcing NETWORK_BACKEND=netavark in all subsequent environments."
+ echo "NETWORK_BACKEND=netavark" >> /etc/ci_environment
+ fi
;;
container)
if ((CONTAINER==0)); then # not yet inside a container
@@ -218,7 +253,7 @@ case "$TEST_FLAVOR" in
# Defined in .cirrus.yml
# shellcheck disable=SC2154
if [[ "$ALT_NAME" =~ RPM ]]; then
- bigto dnf install -y glibc-minimal-langpack rpm-build
+ bigto dnf install -y glibc-minimal-langpack go-rpm-macros rpkg rpm-build shadow-utils-subid-devel
fi
;&
docker-py)
@@ -247,19 +282,19 @@ case "$TEST_FLAVOR" in
# Use existing host bits when testing is to happen inside a container
# since this script will run again in that environment.
# shellcheck disable=SC2154
- if [[ "$TEST_ENVIRON" == "host" ]]; then
+ if [[ "$TEST_ENVIRON" =~ host ]]; then
if ((CONTAINER)); then
die "Refusing to config. host-test in container";
fi
remove_packaged_podman_files
- make install PREFIX=/usr ETCDIR=/etc
+ make && make install PREFIX=/usr ETCDIR=/etc
elif [[ "$TEST_ENVIRON" == "container" ]]; then
if ((CONTAINER)); then
remove_packaged_podman_files
- make install PREFIX=/usr ETCDIR=/etc
+ make && make install PREFIX=/usr ETCDIR=/etc
fi
else
- die "Invalid value for $$TEST_ENVIRON=$TEST_ENVIRON"
+ die "Invalid value for \$TEST_ENVIRON=$TEST_ENVIRON"
fi
install_test_configs
@@ -273,7 +308,7 @@ case "$TEST_FLAVOR" in
# Ref: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27270#note_499585550
remove_packaged_podman_files
- make install PREFIX=/usr ETCDIR=/etc
+ make && make install PREFIX=/usr ETCDIR=/etc
msg "Installing docker and containerd"
# N/B: Tests check/expect `docker info` output, and this `!= podman info`