Plugin Information
This plugin sets the display name of a build to something other than #1, #2, #3, ... so that you can use an identifier that makes more sense in your context. When you install this plugin, your job configuration page gets additional setting that lets you specify a build name for each new build.
You'll normally use some tokens that evaluates dynamically to some interesting values, such as the unique sequential number, Subversion revision ID, git branch name, formatted build timestamp, etc. The token expansion mechanism is provided by the Token Macro Plugin and therefore extensible. You can click the help button on the right to see the tokens available in your Jenkins. Also note that the build name can be manually modified any time through the UI. People interested in this plugin may be also interested in the Description Setter Plugin, which does similiar things for build description and instead of the name. HistoryVersion 1.3 (Aug 2, 2011)
Version 1.2
Version 1.0 (Mar 1, 2011)
|
Build Name Setter Plugin
Skip to end of metadata
Go to start of metadata

Comments (13)
Mar 02, 2011
Julien Faucher says:
Hello, I'm highly interested in this plugin, as it will give to my users a reada...Hello,
I'm highly interested in this plugin, as it will give to my users a readable name. In fact I would need to display a parameter provided to the build in the build name. How could I do that?
Thanks and regards,
Julien
Mar 19, 2011
Greg Veres says:
This really needs to work with the Version Name plugin. That plugin creates an e...This really needs to work with the Version Name plugin. That plugin creates an environment variable. Can we get this plugin to work with environment variables? That would make it much more useful immediately until other plugins start using the Token Macro Plugin.
Thanks
Greg
Mar 25, 2011
Farshid Ghods says:
filed JENKINS-9159 for this issue.filed JENKINS-9159 for this issue.
Jul 05, 2011
Dan Drew says:
I've been trying to use this but it just seem fundamentally broken. If I use the...I've been trying to use this but it just seem fundamentally broken. If I use the ${VARNAME} syntax then it logs an unrecognized variable error for anything other than ${BUILD_REVISION}, including obvious things that should work like ${SVN_REVISION}. If I use the ${ENV,var=VARNAME} syntax then it just inserts the text verbatim without expansion ("mybuild.${ENV,var=VARNAME}")
Any plans to fix this because I really need to be able to set build names :P
Thanks
Dan
Aug 25, 2011
Paul O'Donnell says:
The ${ENV,var="VARNAME"} syntax does work, but you MUST put quotes around the VA...The ${ENV,var="VARNAME"} syntax does work, but you MUST put quotes around the VARNAME. I tried it without the quotes and got the same result as you. With the quote it works fine.
Sep 15, 2011
Tonio Caputo says:
Strange behaviour on this plugin, not sure if its correct (and will help me solv...Strange behaviour on this plugin, not sure if its correct (and will help me solve my problem too :-) )
Seems that Macro replacer just logs error messages when something is wrong with the definition, except
when a file (from PROPFILE Macro) is not found, in this case the BUILD fails, with a IOException FileNotFound.
In my case the PROPFILE will be generated after the build, so it is correct not to find it, before the build,
any possibility of handling it somehow ?
Is this the correct behaviour ?
After thinking a bit: perhaps a "default" optional macro-property will help
solving it ?
Feb 15, 2012
Tom Alex says:
I've a similar issue, i'm generating the PROPFILE after the SVN checkout. ...I've a similar issue, i'm generating the PROPFILE after the SVN checkout. Not sure how to handle it, since build-name-setter runs "pre-build".
Would be good if this can be ran as a "post build task".
Oct 29, 2012
Brent Duffy says:
Does the Build Name Setter plugin provide an environment variable that I can use...Does the Build Name Setter plugin provide an environment variable that I can use to access the resultant build name? The
${BUILD_NUMBER}environment variable gives me the actual build number of a build, but I don't seem to be able to access the build name set by the Build Name Setter plugin through the environment. Should I log a request for this?
Jan 16, 2013
Michael Dobrindt says:
Can we can an answer for this question? It would be nice to be able to address ...Can we can an answer for this question?
It would be nice to be able to address the build name the same way we can address the build number or the job name.
Thanks,
Mike
Jun 26, 2013
demogorgonx - says:
I recommend trying out the Version Number Plugin: https://wiki.jenkins-ci.org/di...I recommend trying out the Version Number Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Version+Number+Plugin
It offers similar functionality to the Build Name Setter (if you check the "Build Display Name" option), but also gives you an environmental variable that can be used to access the resultant build name.
Nov 12, 2013
KaibutsuX Mahou says:
Is it possible to use set the build name from a push notification? I want to bui...Is it possible to use set the build name from a push notification? I want to build all branches in my project and I have polling enabled (no schedule) but I just want to label the build with the approrpriate branch.
I am using:
#${BUILD_NUMBER}: ${ENV,var="BRANCH"}for the "Set Build Name" option.
And my push notification url is: curl --data "url=[projectName]&BRANCH=$branch" "http://[jenkinsServer]:8080/git/notifyCommit"
Nov 13, 2014
Darrell Denlinger says:
As a fan of logging it would be nice to get a log line any time the plugin is se...As a fan of logging it would be nice to get a log line any time the plugin is setting the name.
Build name setter plugin setting name to '#${BUILD_NUMBER}:${GIT_BRANCH}' resolves to '#123:master'May 04
Elgin Peteza says:
Does this override the display name of builds in queue? Or will it still display...Does this override the display name of builds in queue? Or will it still display the projected build number?
Add Comment