This repository has been archived by the owner on Mar 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GCR: ignore exceptions when building images
Ignore exceptions refreshing the accessToken in ContainerRegistryAuthSupplier when building the image or getting the RegistryAuth to be used for swarm. Since `authForBuild()` has no arguments, we currently try to return an AccessToken to use _in case_ the image being built needs to pull from gcr.io, but we should ignore failures in the case that the image being built does not need to pull anything from gcr.io. This way someone using ContainerRegistryAuthSupplier with credentials that do not actually have access to GCR do not get exceptions when building non-GCR images. If the accessToken can't be fetched in `authForBuild` for a gcr.io image, then the build will still fail but at a later point when the docker daemon tries to pull the FROM image and throws an error about how the image is "missing or access is denied".
- Loading branch information
Showing
2 changed files
with
79 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters