From 4ff39df927eb6b955ad6054e3528b0a3fa475850 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 22 Feb 2019 09:23:07 -0500 Subject: Implement SNAPSHOT trigger --- build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index b3f7a03..6a29b7c 100755 --- a/build.sh +++ b/build.sh @@ -6,6 +6,13 @@ PYTHON_VERSION="${2}" TAGS=() SUFFIX= image_tag="${PROJECT_VERSION}" +EXTRA=() +SNAPSHOT=${SNAPSHOT:-} + +if [[ -n ${SNAPSHOT} ]]; then + EXTRA+=( "--no-cache" ) + EXTRA+=( "--pull" ) +fi if [[ -z ${PROJECT_VERSION} ]]; then echo "Pipeline version required [e.g. hstdp-2018.3]" @@ -46,7 +53,9 @@ set -x TAGS+=( "-t ${PROJECT}:${image_tag}" ) PIPELINE="${PROJECT_VERSION}" -docker build ${TAGS[@]} \ +docker build \ + ${EXTRA[@]} \ + ${TAGS[@]} \ --build-arg HUB="${HUB}" \ --build-arg PYTHON_VERSION="${PYTHON_VERSION}" \ --build-arg PIPELINE="${PROJECT_VERSION}" \ -- cgit