try logging in to Dockerhub only on internal PRs
@@ -106,11 +106,15 @@ before_script:
- sudo apt-get -qq -y update
- sudo apt-get -qq -y install jq coreutils
- |
- # Login to dockerhub
+ # Login to dockerhub (if internal PR)
# This used to be part of the deploy step, but since dockerhub introduced rate limiting
# we now need to be logged in also for all pull steps, thus it is now at the beginning
# of the pipeline
+ if [ "$TRAVIS_REPO_SLUG" = "semi-technologies/weaviate" ]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
+ else
+ echo "Cannot login to Dockerhub, as this is an external PR. There is a risk that the build will fail due to rate limiting"
+ fi
- |
if [ "$TRAVIS_BRANCH" = "master" ]; then
# build the build tools
