Skip to content

Commit

Permalink
Skip docker login from forks
Browse files Browse the repository at this point in the history
- Travis does not allow secret env variables to be used in forks which results into all the PRs opened by external contributors to fail. By adding this docker logins will not be executed and therefore builds now may still fail due to docker free quota being reached (since the egres ip from travis is shared among all the hosts). This is preferable as at least there is a change that the build will pass, unfortunately Travis does not provide any solution for this at the moment.
  • Loading branch information
dikhan committed Apr 10, 2022
1 parent 5be1f03 commit be1292a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
- docker

env:
- TF_VERSION=0.13.6 PERFORM_DOCKER_LOGIN=true GO111MODULE=on
- TF_VERSION=0.13.6 PERFORM_DOCKER_LOGIN=$TRAVIS_SECURE_ENV_VARS GO111MODULE=on

install:
- go install github.com/goreleaser/goreleaser@v1.6.3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ show-terraform-version:
# to avoid Docker toomanyrequests: You have reached your pull rate limit.
dockerhub-login:
@echo "[INFO] Logging into Docker Hub Enabled=$(PERFORM_DOCKER_LOGIN)"
ifdef PERFORM_DOCKER_LOGIN
ifeq ($(PERFORM_DOCKER_LOGIN),true)
echo $(DOCKER_PASSWORD) | docker login -u $(DOCKER_USERNAME) --password-stdin
endif

Expand Down

0 comments on commit be1292a

Please sign in to comment.