From d12642df364d81c2fba6dda74b753fb3a947848b Mon Sep 17 00:00:00 2001 From: anmol372 Date: Mon, 16 Dec 2024 13:57:47 -0800 Subject: [PATCH] update opflex build to only build opflex-build-base image if a tag comtaining "opflex-build-base" is pushed --- docker/travis/build-opflex-travis.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docker/travis/build-opflex-travis.sh b/docker/travis/build-opflex-travis.sh index 06cafc55..e45b2c16 100755 --- a/docker/travis/build-opflex-travis.sh +++ b/docker/travis/build-opflex-travis.sh @@ -21,10 +21,15 @@ DOCKER_DIR=docker/travis OPFLEX_DIR=. export OPFLEX_DIR -BUILD_BASE=$(git show -s --format=%B "${TRAVIS_TAG}" | grep -i "opflex-build-base" | tr -d '\n') +# Check if the tag contains "opflex-build-base" +if [[ "${TRAVIS_TAG}" == *"opflex-build-base"* ]]; then + BUILD_BASE=true +else + BUILD_BASE=false +fi set -Eeuxo pipefail -if [[ -n "$BUILD_BASE" ]]; then +if [[ "${BUILD_BASE}" == true ]]; then echo "starting opflex-base build" docker build $BUILDARG $SECOPT -t $DOCKER_HUB_ID/opflex-build-base:$DOCKER_TAG -f $DOCKER_DIR/Dockerfile-opflex-build-base . &> /tmp/opflex-build-base.log & while [ ! -f /tmp/opflex-build-base.log ]; do sleep 10; done