3
votes

In Jenkins I use a parameterized build. I use the "This build is parameterized" and "List subversion tags" to which I set the "Name" to be SVN_TAG. Then I set this SVN_TAG in "Set Build Name" to "${SVN_TAG}". However, the build then says "Unrecognized macro 'SVN_TAG' in '${SVN_TAG}'" and it does not set the build name. Any ideas to why the build doesn't find this macro?

1

1 Answers

7
votes

If you click on the (?) help icon next to the Build Name field, you'll see a list of the macros you can use.

Build parameters are exported as environment variables during the build, so as per that documentation, you need to use the format ${ENV,var="VARIABLENAME"}.

So using the value ${ENV, var="SVN_TAG"} should give you the behaviour you're looking for.