-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins v1.642.4 LTS
The Rebuild plugin in jenkins fails to rebuild a job when it contains a hidden string parameter that contains the character string "MultiJobBuildSelector" in the default value field. For a simple reproducible example do the following:
- install the following plugins:
copy artifact, rebuild, hidden parameter - create a new job with the following configuration:
- Add a parameter of type "hidden" with an arbitrary name and a defult value of "MultiJobBuildSelector"
- save the job and run it once
- select the build that just completed and click the "rebuild" link
This produces the following error (see attached screenshot):
javax.servlet.ServletException: java.lang.ClassCastException: com.wangyin.parameter.WHideParameterDefinition cannot be cast to hudson.model.SimpleParameterDefinition
This is fragile for those rare cases when a hidden parameter actually does need to contain that exact string, but it is also problematic when one wants to have a hidden job parameter to control which build the copy artifact plugin should use.
I would suggest two changes here:
- modify the logic of the multijob build selector to look for an exact match for the XML configuration needed to correctly populate a build selector parameter (avoiding accidental matches )
- modify the rebuild logic so that when a hidden parameter contains this exact XML that it correctly instantiates the multijob build selector so copy artifacts will work correctly when rebuilt using a hidden string parameter
- is related to
-
JENKINS-13644 Rebuild plugin can't rebuild when using parameters specified by copyartifact
- Resolved
-
JENKINS-41529 Rebuilder support by copyartifact
- Open