Skip to content

Commit

Permalink
update opflex build
Browse files Browse the repository at this point in the history
to only build opflex-build-base image
if a tag comtaining "opflex-build-base" is pushed
  • Loading branch information
anmol372 committed Dec 16, 2024
1 parent 243318b commit d12642d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docker/travis/build-opflex-travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d12642d

Please sign in to comment.