Skip to content

capture the image name without building it #4379

Open
@msillence

Description

@msillence

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions