Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Honour DOCKER_CONFIG env var in jib the same way as in jib-core
Support for DOCKER_CONFIG has been added in #27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder with a `config.json` file. To keep backward compatibility, if `DOCKER_CONFIG` points to a file, it will be left untouched. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`. (cherry picked from commit d5e2991)
- Loading branch information