Update the Maven and Gradle plugins to make use of the new Docker
configuration authentication support.
See gh-45269
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
Add `DockerRegistryAuthentication` implementation that uses standard
Docker config to authenticate requests.
Prior to this commit, we only supported username/password and token
based authentication. This commit allows authentication based on
the contents of the Docker configuration file, including support
for executing credential helpers.
See gh-45269
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
Update `DockerConfigurationMetadata` with support for `credsStore`,
`credHelpers` and `auth` sections. These values will be required to
support credential helper based authentication.
See gh-45269
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Relate `DockerConfiguration` from `...platform.docker` to
`...platform.build` since it contains build specific concepts.
This commit also refactors a few other areas of the code to make it
easier to support credential helpers in the future.
Closes gh-45283
Update `EphemeralBuilder` so that it adds an additional layer that
containing an empty application (aka workspace) directory owned by
the build user.
Prior to this commit, the directory was only bound. This could cause
issues on Podman where, unlike Docker, the bound directory is owned
by `root`.
Fixes gh-45233
This commit updates ResourcesClassLoader to be a SmartClassLoader and
expose the original ClassLoader. This has the effect of making sure
proxies that are created by CGLIB can be reused against different tests
rather than having CGLIB trying to define the class again and fail.
Closes gh-45065
This commit harmonizes the behavior of the native and nativeTest Maven
profiles. Previously, enabling the nativeTest profile would
automatically add an execution of the Spring Boot and Native Build Tools
plugins, even in a module that doesn't represent an application or a
Spring Boot-related module.
With this commit, the native testing feature is only enabled if the
plugins are defined in the project, either directly, or in a parent.
The documentation has been updated as the behavior of both profiles is
now much more consistent.
Closes gh-44696
Before this commit, if the status code was 4xx or 500, we tried to read the errors
object, consuming the http entity. When we tried to deserialize the message,
the http entity was already consumed, an IOException has been thrown and null
is returned for the message.
Now, we read the content in a byte[] and deserialize the errors and the message
from that. This ensures that we can read both the errors and the message.
Closes gh-44628
This commit introduces a new constructor in `DockerApi`
that accepts `DockerLogger` as a parameter.
The `DockerLogger` is a pretty simple callback interface used to
provide DockerApi output logging.
See gh-44412
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>