summaryrefslogtreecommitdiff
path: root/contrib/cirrus/setup_container_environment.sh
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-04-03 07:51:42 -0700
committerGitHub <noreply@github.com>2019-04-03 07:51:42 -0700
commit2ad5f5cc25844d0723116149b42e04ab310269f4 (patch)
tree6f569aea9d7922ff8a1d64079b2d96ebc695b062 /contrib/cirrus/setup_container_environment.sh
parentad467ba16e5f78a159c730ea005830cfa075de15 (diff)
parent599714d9f2b5d0715a5cda0275fbea64d581bbc6 (diff)
downloadpodman-2ad5f5cc25844d0723116149b42e04ab310269f4.tar.gz
podman-2ad5f5cc25844d0723116149b42e04ab310269f4.tar.bz2
podman-2ad5f5cc25844d0723116149b42e04ab310269f4.zip
Merge pull request #2833 from cevich/podman_in_podman
Cirrus: Support special-case modes of testing
Diffstat (limited to 'contrib/cirrus/setup_container_environment.sh')
-rwxr-xr-xcontrib/cirrus/setup_container_environment.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/cirrus/setup_container_environment.sh b/contrib/cirrus/setup_container_environment.sh
new file mode 100755
index 000000000..23df4fe8b
--- /dev/null
+++ b/contrib/cirrus/setup_container_environment.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+source $(dirname $0)/lib.sh
+
+req_env_var "
+GOSRC $GOSRC
+OS_RELEASE_ID $OS_RELEASE_ID
+CONTAINER_RUNTIME $CONTAINER_RUNTIME
+"
+
+DIST=$OS_RELEASE_ID
+IMAGE=${DIST}podmanbuild
+
+# Since CRIU 3.11 has been pushed to Fedora 28 the checkpoint/restore
+# test cases are actually run. As CRIU uses iptables to lock and unlock
+# the network during checkpoint and restore it needs the following two
+# modules loaded.
+modprobe ip6table_nat || :
+modprobe iptable_nat || :
+
+# Build the test image
+${CONTAINER_RUNTIME} build -t ${IMAGE} -f Dockerfile.${DIST} .