Hi Bob,

I've been dealing with a similar problem here. According to comments in the Build Name Setter plugin code, it checks twice for a value to set the build name. I suspect that the first check is before your Groovy script sets the parameter, so it doesn't get set until the second check near the end of the build. One thought I had was to use the Envinject <https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin>plugin, which gives a lot more flexibility about when the environment variables are set.

Regards,
Eric

On 6/24/2013 2:05 PM, Bob Bick wrote:

Hi,

*_Background_*

Currently, I have a System Groovy script that sets a BUILD_NAME_VARparameter using:

build.addAction(new ParametersAction(new StringParameterValue("BUILD_NAME_VAR";,"${val}")))

The Jenkins BuildNameSetterPlugin uses the BUILD_NAME_VAR variable to generate the build name.

*_Problem_*

While the build is executing, the name is not correct (i.e. it does not contain $BUILD_NAME_VAR). However, after the build completes, then the build name shows up correctly (i.e. uses $BUILD_NAME_VAR).

For example, while the build is executing, the Job name shows as:

#35

And after the build completes, it shows as (assuming BUILD_NAME_VAR = "Production build"):

#35 Production build

*_Question_*

Is there a way to set the Job name using a variable (like I am doing); yet, have the job name show the same even while the build is executing?

Any suggestions/help would be appreciated.

Thanks,

Bob


*** *** ***
This message contains information which may be confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to