Variable substitutions in value from param

18 views
Skip to first unread message

Turbo Fredriksson

unread,
Jan 24, 2018, 10:01:58 AM1/24/18
to Jenkins Users
I have the need to substitute a value (removing parts of it) that is coming in via a job parameter.

Param: UPSTREAM_PROJECT
Repo: g...@github.com:pharmpress/${UPSTREAM_PROJECT}.git

This works if the value is "exporter-multimodule", but NOT if "exporter-multimodule/sso". So I need to remove the "/sso" part from the variable.

Is this possible? In a shell script, I would use

    ${UPSTREAM_PROJECT/\/*/}

and it would work, but Jenkins is taking that literally..
Reply all
Reply to author
Forward
0 new messages