Skip to content

Commit 542680c

Browse files
andrewsykimmurali-reddy
authored andcommitted
skip build/push if user is not cloudnativelabs since it cannot access dockerhub creds (#263)
1 parent e27847f commit 542680c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/travis-deploy.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ set -o pipefail
55
# Pull Request image tag format: PR00
66
if [ "${TRAVIS_EVENT_TYPE}" = "pull_request" ]; then
77
PR_USER=$(echo "$TRAVIS_PULL_REQUEST_SLUG" | sed -e 's/\/.*//')
8+
if [ "$PR_USER" != "cloudnativelabs" ]; then
9+
echo "Not building/pushing PR $TRAVIS_PULL_REQUEST since only the cloudnativelabs user can access docker hub credentials"
10+
exit 0
11+
fi
812
echo "Building/pushing PR$TRAVIS_PULL_REQUEST from $PR_USER"
913
make push IMG_TAG="PR$TRAVIS_PULL_REQUEST"
1014
exit 0

0 commit comments

Comments
 (0)