Closed J00MZ closed 5 years ago
Why you ate trying to pass invalid variable to the plugin?
@damianszczepanik It's a valid variable.
I'm currently using a workaround of this issue by setting the plug-in to update only after the build completed.
Then the variable BUILD_USER_ID
resolves just fine to the users username.
This issue occurs only when setting the name on job start.
So you are trying to use undefined variable at the beginning of building process as it becomed defined later.
@damianszczepanik I'm using this plug-in to set BUILD_USER_ID variable.
Are you saying that plug-in sets the variable after the Build Setter does?
Based on the log from previous version it looks like this is true.
It's common to use an environment variable that will be set during the build later in the build name. And the macro syntax works without specifying ${ENV,var="envvarname"}, just ${envvarname}. Now I've changed it to ${ENV,var="envvarname"}, but it is not updated when the variable appears. So the only option is revert to 1.7.1
Revert to older version. Looks like there is regression which happens when thus plugin is used with other.
Fixed, will release asap
Released
Encountered different behavior when using variable
BUILD_USER_ID
as job namein v1.7.1 job continued with error message
Unrecognized macro 'BUILD_USER_ID'
but did not failin v2.0 job fails
EDIT: Issue occurs only when setting the name on job start.
So it's possible to implement a workaround by setting the name only at job completion.
v1.7.1
v 2.0
Jenkins Version: 2.174