Class JibConfigurationService

java.lang.Object
io.micronaut.maven.jib.JibConfigurationService

@Singleton public class JibConfigurationService extends Object
Exposes the Jib plugin configuration so that it can be read by other mojos.
Since:
1.1
Author:
Álvaro Sánchez-Mariscal
  • Constructor Details

    • JibConfigurationService

      @Inject public JibConfigurationService(org.apache.maven.project.MavenProject mavenProject)
  • Method Details

    • getToImage

      Returns:
      the to.image configuration.
    • getFromImage

      Returns:
      the from.image configuration.
    • getTags

      public Set<String> getTags()
      Returns:
      the to.tags configuration.
    • getToCredentials

      public Optional<com.google.cloud.tools.jib.api.Credential> getToCredentials()
      Returns:
      the to.auth.username and to.auth.password configuration.
    • getFromCredentials

      public Optional<com.google.cloud.tools.jib.api.Credential> getFromCredentials()
      Returns:
      the from.auth.username and from.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

      public List<String> getArgs()
      Returns:
      the container.args configuration.
    • getPorts

      Returns:
      the container.ports configuration.