Jib: Add clear and non-ambiguous maven properties to the maven plugin

Created on 27 Jul 2018  路  5Comments  路  Source: GoogleContainerTools/jib

When using Maven, often one wants to pass some of the plugin configuration via properties (-DmyProp).

Currently it seems some of the configuration are available via properties but:

  • it's not documented anywhere (usually plugins have each configuration mapped to an expression that is resolved by maven, and it appears in plugin doc as well as in IDE)
  • it's not clear if things like credHelper, if it is available as a property, is going to be applied to to, from or both.

It would be great if all the configuration could be specified via properties named like jib.to.credHelper and so on.

prioritp1

All 5 comments

Hi @victornoel , thanks for the feature suggestion! We don't actually have any configuration available via properties except for the target image (via the image shorthand). We'll definitely look at adding properties to configure other configuration as well @GoogleContainerTools/java-tools .

It would be great if all the configuration could be specified via properties named like jib.to.credHelper and so on.

What you can do in the meantime is like this:

  <properties>
    <jib.to.credHelper>my-default-cred-helper</jib.to.credHelper>
  </properties>
      <plugin>
        <groupId>com.google.cloud.tools</groupId>
        <artifactId>jib-maven-plugin</artifactId>
        <version>0.9.7</version>
        <configuration>
          <to>
            <image> ... </image>
            <credHelper>${jib.to.credHelper}</credHelper>
          </to>
        </configuration>

Then you can do, e.g., mvn -Djib.to.credHelper=docker jib:build.

@chanseokoh that's exactly what I'm doing right now, so I think that we can make this feature request kind of low prio but nice to have :)

Hi @victornoel , we've released version 0.10.0 with system properties to define any of Jib's configuration.

@coollog hey thanks for the heads up! :+1:

Was this page helpful?
0 / 5 - 0 ratings