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

Commit ce61029

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

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/before_install_build

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ fi
1616

1717
pip install --upgrade -r test/requirements.txt
1818

19+
# We always need to login to docker to avoid: toomanyrequests
20+
[ "${DOCKER_USERNAME}" == "" ] && die "Need env var DOCKER_USERNAME to pull/push to docker"
21+
[ "${DOCKER_PASSWORD}" == "" ] && die "Need env var DOCKER_PASSWORD to pull/push to docker"
22+
23+
docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}"
24+
echo "Logged in to docker with user '${DOCKER_USERNAME}'"
25+
1926
./host-scripts/gen-scm-source.sh
2027
docker build -t selenium .
2128
docker tag selenium:latest elgalu/selenium:latest
@@ -25,12 +32,5 @@ if [ "${TRAVIS_BUILD_NUMBER}" != "" ]; then
2532
# Let's push this image to re-use it in TravisCI stages
2633
# in order to speed up the build
2734
docker tag selenium:latest elgalu/build_selenium:${TRAVIS_BUILD_NUMBER}
28-
29-
[ "${DOCKER_USERNAME}" == "" ] && die "Need env var DOCKER_USERNAME to push to docker"
30-
[ "${DOCKER_PASSWORD}" == "" ] && die "Need env var DOCKER_PASSWORD to push to docker"
31-
32-
docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}"
33-
echo "Logged in to docker with user '${DOCKER_USERNAME}'"
34-
3535
docker push elgalu/build_selenium:${TRAVIS_BUILD_NUMBER}
3636
fi

0 commit comments

Comments
 (0)