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

Commit

Permalink
We always need to login to docker to avoid: toomanyrequests
Browse files Browse the repository at this point in the history
  • Loading branch information
elgalu committed Apr 24, 2021
1 parent 63d31e3 commit ce61029
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/before_install_build
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ fi

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

# We always need to login to docker to avoid: toomanyrequests
[ "${DOCKER_USERNAME}" == "" ] && die "Need env var DOCKER_USERNAME to pull/push to docker"
[ "${DOCKER_PASSWORD}" == "" ] && die "Need env var DOCKER_PASSWORD to pull/push to docker"

docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}"
echo "Logged in to docker with user '${DOCKER_USERNAME}'"

./host-scripts/gen-scm-source.sh
docker build -t selenium .
docker tag selenium:latest elgalu/selenium:latest
Expand All @@ -25,12 +32,5 @@ if [ "${TRAVIS_BUILD_NUMBER}" != "" ]; then
# Let's push this image to re-use it in TravisCI stages
# in order to speed up the build
docker tag selenium:latest elgalu/build_selenium:${TRAVIS_BUILD_NUMBER}

[ "${DOCKER_USERNAME}" == "" ] && die "Need env var DOCKER_USERNAME to push to docker"
[ "${DOCKER_PASSWORD}" == "" ] && die "Need env var DOCKER_PASSWORD to push to docker"

docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}"
echo "Logged in to docker with user '${DOCKER_USERNAME}'"

docker push elgalu/build_selenium:${TRAVIS_BUILD_NUMBER}
fi

0 comments on commit ce61029

Please sign in to comment.