Package io.micronaut.maven.jib
Class JibConfigurationService
java.lang.Object
io.micronaut.maven.jib.JibConfigurationService
Exposes the Jib plugin configuration so that it can be read by other mojos.
- Since:
- 1.1
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetArgs()
Optional<com.google.cloud.tools.jib.api.Credential>
getPorts()
getTags()
Optional<com.google.cloud.tools.jib.api.Credential>
Optional<com.google.cloud.tools.jib.api.Credential>
resolveCredentialForImage
(String image, org.slf4j.Logger logger) Resolves effective credentials for a registry hosting the provided image reference.
-
Constructor Details
-
JibConfigurationService
-
-
Method Details
-
getToImage
- Returns:
- the
to.image
configuration.
-
getFromImage
- Returns:
- the
from.image
configuration.
-
getTags
- Returns:
- the
to.tags
configuration.
-
getToCredentials
- Returns:
- the
to.auth.username
andto.auth.password
configuration.
-
getFromCredentials
- Returns:
- the
from.auth.username
andfrom.auth.password
configuration.
-
resolveCredentialForImage
public Optional<com.google.cloud.tools.jib.api.Credential> resolveCredentialForImage(String image, org.slf4j.Logger logger) Resolves effective credentials for a registry hosting the provided image reference. Precedence: explicit credentials -> well-known credential helpers -> Google ADC -> docker config.- Parameters:
image
- the image reference (e.g., gcr.io/project/image:tag)logger
- the logger to use for logging events- Returns:
- a Credential if one could be resolved
-
getWorkingDirectory
- Returns:
- the
container.workingDirectory
configuration.
-
getArgs
- Returns:
- the
container.args
configuration.
-
getPorts
- Returns:
- the
container.ports
configuration.
-