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

Rebuild should offer parameters not currently defined on the job

    Details

    • Similar Issues:

      Description

      Rebuild-last/Rebuild plugin does not carry parameters passed in from parent job when using folders.

      These are parameters that are not defined in the job itself — the job relies on a parent build-flow job to pass them in.

        Attachments

          Issue Links

            Activity

            Hide
            lmgrill Larry Grill added a comment - - edited

            Thanks for the response Daniel.

            I now see that this is not a folders plugin related issue, but appears to be a Jenkins version issue.

            My initial efforts were on a Jenkins OSS version 1.569 using Rebuilders plugin version 1.21. This was a folder-less setup.
            My folderized tests system is a Jenkins Enterprise version 1.574 using Rebuilders 1.21. This is the folderized setup.
            Since the Jenkins versions were pretty close, i didn't expect different behavior based on the Jenkins version, but in fact that seems to be the case.

            To simplify the test i made two new free-style jobs at the top level of Jenkins instances.
            "Trigger Source" has one String parameter "TEST_PARAM" default value = "Got it?".
            "Trigger Target" job is just a a new free style with no changes.
            "Trigger Source" triggers "Trigger Target" with Add Paramters/Current build parameters.

            After one time launch of "Trigger Source" on the 1.569 instance, doing Rebuild Last on the "Trigger Target"displays the TEST_PARAM passed in, but on the 1.574 Enterprise instance, rebuilding the "Trigger Target" job does not display or pass the previously passed in TEST_PARAM.

            I'll do some additional testing on the Jenkins versions in-between these two, and also OSS vs. Enterprise to see if i can isolate where the change occurred.

            Show
            lmgrill Larry Grill added a comment - - edited Thanks for the response Daniel. I now see that this is not a folders plugin related issue, but appears to be a Jenkins version issue. My initial efforts were on a Jenkins OSS version 1.569 using Rebuilders plugin version 1.21. This was a folder-less setup. My folderized tests system is a Jenkins Enterprise version 1.574 using Rebuilders 1.21. This is the folderized setup. Since the Jenkins versions were pretty close, i didn't expect different behavior based on the Jenkins version, but in fact that seems to be the case. To simplify the test i made two new free-style jobs at the top level of Jenkins instances. "Trigger Source" has one String parameter "TEST_PARAM" default value = "Got it?". "Trigger Target" job is just a a new free style with no changes. "Trigger Source" triggers "Trigger Target" with Add Paramters/Current build parameters. After one time launch of "Trigger Source" on the 1.569 instance, doing Rebuild Last on the "Trigger Target"displays the TEST_PARAM passed in, but on the 1.574 Enterprise instance, rebuilding the "Trigger Target" job does not display or pass the previously passed in TEST_PARAM. I'll do some additional testing on the Jenkins versions in-between these two, and also OSS vs. Enterprise to see if i can isolate where the change occurred.
            Hide
            lmgrill Larry Grill added a comment - - edited

            It appears that this is also not connected to the Jenkins version, but has been working for us due to a magical combination of plugins on our release build system.

            I will still argue that the goal of the Rebuild plugin is to rebuild the last run of the job using the same parameters that job run used (whether they are configured in the job or not) and that the rebuild should use the parameter list one sees with http://jenkins-url/job/job-name/1/parameters/

            I am now assuming that we can achieve the desired behavior by matching a required plugin set. If that proves impossible to replicate we can attempt to enhance the Rebuild plugin to support this capability.

            Show
            lmgrill Larry Grill added a comment - - edited It appears that this is also not connected to the Jenkins version, but has been working for us due to a magical combination of plugins on our release build system. I will still argue that the goal of the Rebuild plugin is to rebuild the last run of the job using the same parameters that job run used (whether they are configured in the job or not) and that the rebuild should use the parameter list one sees with http://jenkins-url/job/job-name/1/parameters/ I am now assuming that we can achieve the desired behavior by matching a required plugin set. If that proves impossible to replicate we can attempt to enhance the Rebuild plugin to support this capability.
            Hide
            lmgrill Larry Grill added a comment -

            Ok, this is actually just a regression in the Rebuild plugin from version 1.21 to 1.22.

            Version 1.22 does not work as expected. Version1.21 does.

            I had used Jenkins Plugin Manager to downgrade the plugin from 122 to 1.21 on the new folderized test system, but that did not cure it. I had to blow away the rebuild plugin directory from the Jenkins home plugins folder and do a fresh install of version 1.21 to get rid of the issue.

            Show
            lmgrill Larry Grill added a comment - Ok, this is actually just a regression in the Rebuild plugin from version 1.21 to 1.22. Version 1.22 does not work as expected. Version1.21 does. I had used Jenkins Plugin Manager to downgrade the plugin from 122 to 1.21 on the new folderized test system, but that did not cure it. I had to blow away the rebuild plugin directory from the Jenkins home plugins folder and do a fresh install of version 1.21 to get rid of the issue.
            Hide
            scoheb Scott Hebert added a comment -

            Please note that I have attempted to fix the related issue JENKINS-24491 with https://github.com/jenkinsci/rebuild-plugin/pull/29

            Show
            scoheb Scott Hebert added a comment - Please note that I have attempted to fix the related issue JENKINS-24491 with https://github.com/jenkinsci/rebuild-plugin/pull/29
            Hide
            lmgrill Larry Grill added a comment -

            Hi Scott. Looks like your PR was merged into the latest builds, but I just accidentally upgraded to v. 1.25 and still see the same behavior. Parameters passed into jobs by our build flow master job that do not exist in the individual job configuration are gone.

            Show
            lmgrill Larry Grill added a comment - Hi Scott. Looks like your PR was merged into the latest builds, but I just accidentally upgraded to v. 1.25 and still see the same behavior. Parameters passed into jobs by our build flow master job that do not exist in the individual job configuration are gone.

              People

              • Assignee:
                Unassigned
                Reporter:
                lavaliere Tracy Kennedy
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: