summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2018-12-14 10:47:01 -0500
committerChris Evich <cevich@redhat.com>2018-12-14 14:34:43 -0500
commit7b53e86e4ff3c97de3261fa64be17d6fb1201ffd (patch)
treed17e0ff37e19119e8e16725b560174ebff1a1cbe /contrib
parentc086118fca59600de49ba12035fef47f45e23286 (diff)
downloadpodman-7b53e86e4ff3c97de3261fa64be17d6fb1201ffd.tar.gz
podman-7b53e86e4ff3c97de3261fa64be17d6fb1201ffd.tar.bz2
podman-7b53e86e4ff3c97de3261fa64be17d6fb1201ffd.zip
Add script to create CI VMs for debugging
Frequently debugging of CI-related problems requires going hands-on within the environment. However, reproducing the environment by hand is very tedious and error prone. This script permits authorized users to produce VM's based on any available cache-image, and automatically remove them upon logout. Also: Bump up VM disk sizes to 200GB due to performance reasons Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cirrus/lib.sh13
-rwxr-xr-xcontrib/cirrus/setup_environment.sh1
2 files changed, 13 insertions, 1 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh
index 985264f22..51db203fd 100644
--- a/contrib/cirrus/lib.sh
+++ b/contrib/cirrus/lib.sh
@@ -6,6 +6,19 @@
# Under some contexts these values are not set, make sure they are.
export USER="$(whoami)"
export HOME="$(getent passwd $USER | cut -d : -f 6)"
+
+# These are normally set by cirrus, if not use some reasonable defaults
+ENVLIB=${ENVLIB:-.bash_profile}
+CIRRUS_WORKING_DIR=${CIRRUS_WORKING_DIR:-/var/tmp/go/src/github.com/containers/libpod}
+SCRIPT_BASE=${SCRIPT_BASE:-./contrib/cirrus}
+PACKER_BASE=${PACKER_BASE:-./contrib/cirrus/packer}
+CIRRUS_BUILD_ID=${CIRRUS_BUILD_ID:-DEADBEEF} # a human
+cd "$CIRRUS_WORKING_DIR"
+CIRRUS_BASE_SHA=${CIRRUS_BASE_SHA:-$(git rev-parse upstream/master || git rev-parse origin/master)}
+CIRRUS_CHANGE_IN_REPO=${CIRRUS_CHANGE_IN_REPO:-$(git rev-parse HEAD)}
+CIRRUS_REPO_NAME=${CIRRUS_REPO_NAME:-libpod}
+cd -
+
if ! [[ "$PATH" =~ "/usr/local/bin" ]]
then
export PATH="$PATH:/usr/local/bin"
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index 4884dd606..174bd3daf 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -4,7 +4,6 @@ set -e
source $(dirname $0)/lib.sh
req_env_var "
-CI $CI
USER $USER
HOME $HOME
ENVLIB $ENVLIB