diff --git a/.travis.yml b/.travis.yml index d6c9d57b..e214ea5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ jobs: - export UPSTREAM_ID=81c2369 script: - echo "Skip running UTs" - - git clone http://www.github.com/noironetworks/cicd -b main /tmp/cicd + - git clone http://www.github.com/noironetworks/cicd -b opflextag /tmp/cicd - /tmp/cicd/travis/check-git-tag.sh; RETURN_CODE=$? ; if [ $RETURN_CODE -eq 140 ]; then travis_terminate 0; elif [ $RETURN_CODE -ne 0 ]; then travis_terminate $RETURN_CODE; fi - /tmp/cicd/travis/build-push-opflex-images.sh || travis_terminate 1 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