Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Commit a9c0701

Browse files
authored
We always need to login to docker to avoid: toomanyrequests
1 parent ce61029 commit a9c0701

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/before_install_pull

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ docker-compose --version || echo "WARN: No docker-compose installed yet"
1919

2020
[ "${TRAVIS_BUILD_NUMBER}" == "" ] && die "Need env var TRAVIS_BUILD_NUMBER to know where to pull from"
2121

22+
# We always need to login to docker to avoid: toomanyrequests
23+
[ "${DOCKER_USERNAME}" == "" ] && die "Need env var DOCKER_USERNAME to pull from docker"
24+
[ "${DOCKER_PASSWORD}" == "" ] && die "Need env var DOCKER_PASSWORD to pull from docker"
25+
26+
docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}"
27+
echo "Logged in to docker with user '${DOCKER_USERNAME}'"
28+
2229
if [[ ${TRAVIS_PULL_REQUEST_SLUG} != "" && \
2330
${TRAVIS_PULL_REQUEST_SLUG} != ${TRAVIS_REPO_SLUG} && \
2431
${TRAVIS_PULL_REQUEST} != "false" ]]; then

0 commit comments

Comments
 (0)