[Travis] Added logging into Docker Hub #644
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA: https://issues.ibexa.co/browse/EZP-32270
Introduction
Docker Hub introduces rate limiting when downloading images. From https://www.docker.com/blog/docker-hub-image-retention-policy-delayed-and-subscription-updates/ :
This makes our build fail from time to time with:
(from https://travis-ci.com/github/ezsystems/ezplatform-http-cache/jobs/469283098 )
Travis also has a blogpost about it: https://blog.travis-ci.com/docker-rate-limits
with the key line being
Travis CI has a built in registry cache for Docker builds
.I've received confirmation from Travis support that the registry cache is active only when we're authenticated to Docker:
This comes with an obvious downside - env variables are not available when PRs are made from forks, which means PRs from forks won't be using the Travis registry cache and might encounter Docker hub rate limiting.
There are two solutions to that:
This PR aims to solve the issue for our internal use, I think we can spend more time later to think about the best solution that takes our contributors into account (one of the above or something else completely).
What also needs to be done, if this is accepted: configure the DOCKER_USERNAME and DOCKER_PASSWORD variables for each repository.
Results
Build passing without Docker credentials configured:
https://travis-ci.com/github/ezsystems/ezplatform/builds/212349699
Build passing with Docker credentials configured:
https://travis-ci.com/github/ezsystems/ezplatform/jobs/469590356