diff options
author | Chris Evich <cevich@redhat.com> | 2022-01-18 16:58:04 -0500 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2022-02-11 14:47:57 -0500 |
commit | 6b0d4d9158662501b8bf36a69d351abaa9265c84 (patch) | |
tree | 4028e290d430a063867e0451eb4af344368046d4 | |
parent | b63f61f5cdf5416bb1431188e98ce55bd97f5cf0 (diff) | |
download | podman-6b0d4d9158662501b8bf36a69d351abaa9265c84.tar.gz podman-6b0d4d9158662501b8bf36a69d351abaa9265c84.tar.bz2 podman-6b0d4d9158662501b8bf36a69d351abaa9265c84.zip |
Cirrus: Also download aardvark-dns binary
This involves a minor code-change so the download/install can run in a
loop for the two different repositories and binaries. Given everything
is exactly the same except the URLs and names.
Signed-off-by: Chris Evich <cevich@redhat.com>
-rw-r--r-- | .cirrus.yml | 5 | ||||
-rwxr-xr-x | contrib/cirrus/setup_environment.sh | 52 |
2 files changed, 34 insertions, 23 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index c298d5daa..b7cfb2b8d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,6 +9,8 @@ env: DEST_BRANCH: "v4.0" # Netavark branch to use when TEST_ENVIRON=host-netavark NETAVARK_BRANCH: "main" + # Aardvark branch to use + AARDVARK_BRANCH: "main" # Overrides default location (/tmp/cirrus) for repo clone GOPATH: &gopath "/var/tmp/go" GOBIN: "${GOPATH}/bin" @@ -528,6 +530,8 @@ netavark_integration_test_task: TEST_ENVIRON: host-netavark NETAVARK_URL: "https://api.cirrus-ci.com/v1/artifact/github/containers/netavark/success/binary.zip?branch=${NETAVARK_BRANCH}" NETAVARK_DEBUG: 0 # set non-zero to use the debug-mode binary + AARDVARK_URL: "https://api.cirrus-ci.com/v1/artifact/github/containers/aardvark-dns/success/binary.zip?branch=${AARDVARK_BRANCH}" + AARDVARK_DEBUG: 0 # set non-zero to use the debug-mode binary clone_script: *noop # Comes from cache gopath_cache: *ro_gopath_cache setup_script: *setup @@ -757,6 +761,7 @@ success_task: - compose_test - local_integration_test - remote_integration_test + - netavark_integration_test - rootless_integration_test - container_integration_test - netavark_integration_test diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index 62d1e6d45..36e53320c 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -142,31 +142,37 @@ case "$TEST_ENVIRON" in echo "CGROUP_MANAGER=cgroupfs" >> /etc/ci_environment fi # TODO: For the foreseeable future, need to support running tests - # with and without the latest netavark. Once netavark is more - # stable and widely supported in Fedora, it can be pre-installed + # 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 - req_env_vars NETAVARK_BRANCH NETAVARK_URL NETAVARK_DEBUG - msg "Downloading latest netavark from upstream branch '$NETAVARK_BRANCH'" - curl --fail --location -o /tmp/netavark.zip "${NETAVARK_URL}" - - # Needs to be in a specific location - # ref: https://github.com/containers/common/blob/main/pkg/config/config_linux.go#L39 - _nvdir=/usr/local/libexec/podman - mkdir -p $_nvdir - cd $_nvdir - msg "$PWD" - unzip /tmp/netavark.zip - if ((NETAVARK_DEBUG)); then - warn "Using debug netavark binary" - mv netavark.debug netavark - else - rm netavark.debug - fi - cd - - - chmod 0755 $_nvdir/netavark - restorecon -F -v $_nvdir + 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 $_pdir msg "Forcing NETWORK_BACKEND=netavark in all subsequent environments." echo "NETWORK_BACKEND=netavark" >> /etc/ci_environment fi |