Skip to content

capture the image name without building it #4379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
msillence opened this issue Apr 4, 2025 · 0 comments
Open

capture the image name without building it #4379

msillence opened this issue Apr 4, 2025 · 0 comments

Comments

@msillence
Copy link

Is it possible to have some way to evaluate the image name?

mvn initialize help:evaluate -Dexpression=jib.to.image -q -DforceStdout

Alternatives

parse out the entry from the pom and then evaluate it (typically our image names have parameters)

image=$$(xmlstarlet sel -T -t -v "/_:project/_:build/_:plugins/_:plugin/_:configuration/_:to/_:image" pom.xml| sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')

echo "$image" | mvn -N -q  -Drevision=$TAG_NAME  -DforceStdout help:evaluate

Standardise on a parameter for the image name and modify all existing builds and add governence to enfoce it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants