-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 1.460
build-name-setter 1.3
token macro plugin 1.5.1
My build generates a properties file containing version information (derived from various things like the subverison revision and branch name). I'd like to be able to include this in my build names automatically. I'm looking at setting the build name to something like this:
#${BUILD_NUMBER} - ${PROPFILE,file="version.properties",property="version"}
Since build-name-setting runs twice (once after checkout and once after build), the first attempt fails as the properties file doesn't exist yet.
In the case when I try to use an invalid macro, an message is logged in the console output ("Unrecognized macro 'XXX' in ....") but the build otherwise continues. However, in this case, a FATAL error is logged:
FATAL: /home/jenkins/.jenkins/jobs/..../version.properties (No such file or directory)
java.io.FileNotFoundException: /home/jenkins/.jenkins/jobs/..../version.properties (No such file or directory)
<rest of stack trace>
It would be nice if the behaviour was consistent, and the absence of the properties file simply resulted in a warning similar to an invalid macro, rather than completely breaking the build.