summaryrefslogtreecommitdiff
path: root/contrib/cirrus/lib.sh
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-07-10 10:14:00 -0400
committerChris Evich <cevich@redhat.com>2019-07-15 16:42:41 -0400
commit35c174f723da081af7cbc1016992cd6714cf6f24 (patch)
tree965f76523b474c2cecd7aa24f0051fa42b51b587 /contrib/cirrus/lib.sh
parent547cb4e55e9262b7127706d07291f0e45ccf4f42 (diff)
downloadpodman-35c174f723da081af7cbc1016992cd6714cf6f24.tar.gz
podman-35c174f723da081af7cbc1016992cd6714cf6f24.tar.bz2
podman-35c174f723da081af7cbc1016992cd6714cf6f24.zip
Cirrus: Abstract destination branch refs.
Various tasks and scripts behave differently depending on whether or not the build is running against a PR or on a branch, post-merge. However, a great number of them are hard-coded to the string 'master' as the destination. Since this is not always the case (there are other relevant branches), it makes sense to abstract the references with a single definition. Add a top-level `$DEST_BRANCH` variable to CI, and otherwise default to 'master' when unset. This enables running CI builds on additional branches without the overhead of updating all the static references to 'master'. Simply update `$DEST_BRANCH` at the top-level and all branch-conditional logic will function as intended. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/lib.sh')
-rw-r--r--contrib/cirrus/lib.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh
index b2fcaa749..4acdb460a 100644
--- a/contrib/cirrus/lib.sh
+++ b/contrib/cirrus/lib.sh
@@ -45,6 +45,7 @@ fi
# Defaults when not running under CI
export CI="${CI:-false}"
CIRRUS_CI="${CIRRUS_CI:-false}"
+DEST_BRANCH="${DEST_BRANCH:-master}"
CONTINUOUS_INTEGRATION="${CONTINUOUS_INTEGRATION:-false}"
CIRRUS_REPO_NAME=${CIRRUS_REPO_NAME:-libpod}
CIRRUS_BASE_SHA=${CIRRUS_BASE_SHA:-unknown$(date +%s)} # difficult to reliably discover