Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39978

hidden build parameters with its value "xxxBuildSelector" causes rebuild to fail

    Details

    • Similar Issues:

      Description

      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:

      1. 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 )
      2. 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

        Attachments

          Issue Links

            Activity

            Hide
            leedega Kevin Phillips added a comment -

            Adding links to some other issues which I suspect may be related to this problem.

            Show
            leedega Kevin Phillips added a comment - Adding links to some other issues which I suspect may be related to this problem.
            Hide
            ikedam ikedam added a comment -

            It apparently don't relates to copyartifact as it reproduced even without copyartifact in my environment.

            Show
            ikedam ikedam added a comment - It apparently don't relates to copyartifact as it reproduced even without copyartifact in my environment.
            Hide
            ikedam ikedam added a comment -

            Looks caused for incomplete workaround for copyartifact.
            JENKINS-13644
            b46fdf3

            Show
            ikedam ikedam added a comment - Looks caused for incomplete workaround for copyartifact. JENKINS-13644 b46fdf3

              People

              • Assignee:
                ragesh_nair ragesh_nair
                Reporter:
                leedega Kevin Phillips
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: