aboutsummaryrefslogtreecommitdiff
path: root/contrib/cirrus/integration_test.sh
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-05-10 19:02:01 -0400
committerChris Evich <cevich@redhat.com>2019-07-03 16:51:21 -0400
commit1ef8637ae31fa63f98e5edd32e01b090fd66c832 (patch)
treebd3f58288c0b0c33611325eacec245310df21880 /contrib/cirrus/integration_test.sh
parentf5593d305f68409cf093ea6b66a9d1f121ec0fd6 (diff)
downloadpodman-1ef8637ae31fa63f98e5edd32e01b090fd66c832.tar.gz
podman-1ef8637ae31fa63f98e5edd32e01b090fd66c832.tar.bz2
podman-1ef8637ae31fa63f98e5edd32e01b090fd66c832.zip
Cirrus: Automate releasing of tested binaries
It's desirable to make archives available of builds containing actual tested content. While not official distro-releases, these will enable third-party testing, experimentation, and development for both branches (e.g. "master") and pull requests (e.g. "pr3106"). * Add a Makefile targets for archiving both regular podman binaries and the remote-client. Encode release metadata within these archives so that their exact source can be identified. * Fix bug with cross-compiling remote clients for the Windows and Darwin platforms. * Add unit-testing of cross-compiles for Windows and Darwin platforms. * A few small CI-script typo-fixes * Add a script which operates in two modes: 1. Call Makefile targets which produce release archives. Upload the archive to Cirrus-CI's built-in caching system using reproducible cache keys. 2. Utilize reproduced cache keys to attempt download of cache from each tasks. When successful, parse the file's release metadata, using it to name the archive file. Upload all recovered archives to a publicly accessible storage bucket for future reference. * Update the main testing task to call the script in mode #1 for all primary platforms. * Add a new `$SPECIALMODE` task to call the script in mode #1 for Windows and Darwin targets. * Add a new 'release' task to the CI system, dependent upon all other tasks. This new tasks executes the script in mode #2. * Update CI documentation Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/integration_test.sh')
-rwxr-xr-xcontrib/cirrus/integration_test.sh72
1 files changed, 37 insertions, 35 deletions
diff --git a/contrib/cirrus/integration_test.sh b/contrib/cirrus/integration_test.sh
index b163834d5..1b731cb9c 100755
--- a/contrib/cirrus/integration_test.sh
+++ b/contrib/cirrus/integration_test.sh
@@ -15,39 +15,41 @@ fi
cd "$GOSRC"
-if [[ "$SPECIALMODE" == "in_podman" ]]
-then
- ${CONTAINER_RUNTIME} run --rm --privileged --net=host \
- -v $GOSRC:$GOSRC:Z \
- --workdir $GOSRC \
- -e "CGROUP_MANAGER=cgroupfs" \
- -e "STORAGE_OPTIONS=--storage-driver=vfs" \
- -e "CRIO_ROOT=$GOSRC" \
- -e "PODMAN_BINARY=/usr/bin/podman" \
- -e "CONMON_BINARY=/usr/libexec/podman/conmon" \
- -e "DIST=$OS_RELEASE_ID" \
- -e "CONTAINER_RUNTIME=$CONTAINER_RUNTIME" \
- $IN_PODMAN_IMAGE bash $GOSRC/$SCRIPT_BASE/container_test.sh -b -i -t
-elif [[ "$SPECIALMODE" == "rootless" ]]
-then
- req_env_var ROOTLESS_USER
-
- if [[ "$USER" == "$ROOTLESS_USER" ]]
- then
- $GOSRC/$SCRIPT_BASE/rootless_test.sh ${TESTSUITE}
- else
+case "$SPECIALMODE" in
+ in_podman)
+ ${CONTAINER_RUNTIME} run --rm --privileged --net=host \
+ -v $GOSRC:$GOSRC:Z \
+ --workdir $GOSRC \
+ -e "CGROUP_MANAGER=cgroupfs" \
+ -e "STORAGE_OPTIONS=--storage-driver=vfs" \
+ -e "CRIO_ROOT=$GOSRC" \
+ -e "PODMAN_BINARY=/usr/bin/podman" \
+ -e "CONMON_BINARY=/usr/libexec/podman/conmon" \
+ -e "DIST=$OS_RELEASE_ID" \
+ -e "CONTAINER_RUNTIME=$CONTAINER_RUNTIME" \
+ $IN_PODMAN_IMAGE bash $GOSRC/$SCRIPT_BASE/container_test.sh -b -i -t
+ ;;
+ rootless)
+ req_env_var ROOTLESS_USER
ssh $ROOTLESS_USER@localhost \
- -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o CheckHostIP=no \
- $GOSRC/$SCRIPT_BASE/rootless_test.sh ${TESTSUITE}
- fi
-else
- make
- make install PREFIX=/usr ETCDIR=/etc
- make test-binaries
- if [[ "$TEST_REMOTE_CLIENT" == "true" ]]
- then
- make remote${TESTSUITE}
- else
- make local${TESTSUITE}
- fi
-fi
+ -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
+ -o CheckHostIP=no $GOSRC/$SCRIPT_BASE/rootless_test.sh ${TESTSUITE}
+ ;;
+ none)
+ make
+ make install PREFIX=/usr ETCDIR=/etc
+ make test-binaries
+ if [[ "$TEST_REMOTE_CLIENT" == "true" ]]
+ then
+ make remote${TESTSUITE}
+ else
+ make local${TESTSUITE}
+ fi
+ ;;
+ windows) ;& # for podman-remote building only
+ darwin)
+ warn '' "No $SPECIALMODE remote client integration tests configured"
+ ;;
+ *)
+ die 110 "Unsupported \$SPECIAL_MODE: $SPECIALMODE"
+esac