The current version 2.0.2 leads to failing builds when using the builder "Update build name":
This is what we see in the console output of a build:
Getting version from file: PATH_TO_FILE\build_name.txt
Loaded version is #3310 (mytestjob:#740:refs/heads/master)
New run name is ''
ERROR: Build step failed with exception
java.lang.IllegalArgumentException: value shouldn't be null or empty.
at org.jenkinsci.plugins.EnvironmentVarSetter.setVar(EnvironmentVarSetter.java:49)
at org.jenkinsci.plugins.EnvironmentVarSetter.setVar(EnvironmentVarSetter.java:40)
at org.jenkinsci.plugins.buildnamesetter.Executor.setVariable(Executor.java:68)
at org.jenkinsci.plugins.buildnamesetter.Executor.setName(Executor.java:33)
at org.jenkinsci.plugins.buildnameupdater.BuildNameUpdater.perform(BuildNameUpdater.java:98)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1818)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Update build name' marked build as failure
The current version 2.0.2 leads to failing builds when using the builder "Update build name":
This is what we see in the console output of a build:
I think it is related to this line: https://github.com/jenkinsci/build-name-setter-plugin/blob/build-name-setter-2.0.2/src/main/java/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater.java#L96
where
macroTemplate
is used for the build name, although it has not been configured (see screenshot above).