Export to GitHub

build-pipeline-plugin - issue #94

Support custom build name


Posted on May 16, 2012 by Helpful Rabbit

What steps will reproduce the problem? 1. Install and enable the build name setter plugin 2. Set the name of the build job to something other than the default sequential number 3. Execute the build job and look at the pipeline view. The pipeline step still displays the sequential build number instead of the custom build name

What is the expected output? What do you see instead? - The custom build name should be picked up

What version of the product are you using? On what operating system? - Jenkins 1.446 - Build Pipeline Plugin 1.2.4-ALPHA

Please provide any additional information below. - I think I made it work using build.displayName instead of build.number. The attached version of BuildJSONBuilder.groovy should do the trick.

Attachments

Comment #2

Posted on May 29, 2012 by Swift Camel

(No comment was entered for this change.)

Comment #3

Posted on Jun 26, 2012 by Swift Camel

(No comment was entered for this change.)

Comment #4

Posted on Aug 27, 2012 by Massive Elephant

You can't just change number variables to return names. I am unfamiliar with the Build Name Setter Plugin, but any solution would have to identify that it is in use and obtain display names from a display name data element.

Comment #5

Posted on Aug 27, 2012 by Helpful Rabbit

Hehe :-) I agree that number variables are not in the habit of mutating into string variables... even though Groovy vars are not hard-typed, but that's another story.

The purpose of this enhancement is to leverage on custom build names. The build label is currently a number (currentbuild.number) which is reflected in a numeric string (currentbuild.displayName). The build name setter plugin simply overwrites the display name with a custom label, leaving the build number alone. All we need to do in the build pipeline is to add an option for the user to decide whether they want to display the default build number or the (potentially) customized display name. If the build setter plugin is not being used, then the display name property defaults to the build number anyway. At least this is what I found without in-depth testing.

M.

Comment #6

Posted on Nov 19, 2012 by Grumpy Elephant

Looking at the PipelineBuild class, it looks like this issue has been resolved, or at least attempted to be resolved in http://code.google.com/p/build-pipeline-plugin/source/detail?r=d8f1b6ab3e4e78383a89994cc569e11542b1e532. Has this been pushed out in the 1.3 release?

Status: New

Labels:
Type-Enhancement Priority-Medium