Using the jib-maven-plugin
I'd like to build an image with mulitple tags. While mvn jib:build
basically works fine, it "only" tags the image with latest
.
My Maven pom.xml
defines the following:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>2.8.0</version>
<configuration>
<to>
<image>my-private-registry.org/my-image</image>
</to>
</configuration>
</plugin>
The docs show that one can use jib.to.tags
in the XML to define a list of tags. However, I'd like to run the build step in a Jenkins pipeline, i.e. I cannot hard-code the tags in the pom.xml
.
Is it possible to pass the list of tags when running the mvn
command, e.g. by setting some -D
parameters?