Explicitly retry failed docker pulls (#63946)

Closes #63869. Perform `docker pull` explicitly instead of as part of
`docker build`, and wrap it in a retry loop. This is an attempt to make
the build more resilient to transient errors.
This commit is contained in:
Rory Hunter 2020-10-21 13:31:32 +01:00 committed by GitHub
parent 9defe10616
commit 9a8be26cc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 62 additions and 8 deletions

View file

@ -266,6 +266,12 @@ void addBuildDockerImage(Architecture architecture, boolean oss, DockerBase base
dependsOn(copyContextTask)
dockerContext.fileProvider(copyContextTask.map { it.destinationDir })
if (base == DockerBase.UBI) {
baseImages = [ base.getImage() ]
} else {
baseImages = [ base.getImage(), 'alpine:latest' ]
}
String version = VersionProperties.elasticsearch
if (oss) {
tags = [