-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Description of the issue:
I have a multimodule Maven project that uses jib to containerize microservices.
I would like to generate metadata about images before they are built. Such
metadata could be then used to do some checks before performing an image build,
e.g. to scan base image with trivy and abort building if there are known
vulnerabilities.
Currently, jib generates target/jib-image.json file:
{
"image": "β¦",
"imageId": "sha256:β¦",
"imageDigest":"sha256:β¦",
"tags": ["β¦"],
"imagePushed": true
}but only after the image is built.
That metadata can be used for checks, but building an image that might be later
discarded is time consuming. Therefore, it would be better if jib could generate
metadata before building or had some kind of dry-run mode.
Possibly this metadata could be sourced independently of jib via mvn help:effective-pom,
but parsing the POM XML quite complicated.
Environment:
- Jib version: 3.5.1
- Build tool: maven 3.9.12
- OS: Linux