• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • rebuild-plugin
    • None

      When clicking Rebuild on a job, I would expect it to rebuild using the exact same commit that the original used - that's surely the point?

      However, the behaviour I'm observing is that it's using the commit of the last job that was run.

      See attached screenshots. Job 6687 used commit 0c5ae798ca03ad75e54793660c8c9aeda028efcb, and yet the rebuild is using commit 28f803414b92115ab878f60d69a91d0262084ec4.

      Am I misunderstanding what this plugin is supposed to do?

          [JENKINS-39218] Rebuild uses the wrong commit

          Rachel M. added a comment -

          From Bug to Improvement, because this plugin only considers parameters: it allows the user to rebuild a parametrized build without entering the parameters again.

          Rachel M. added a comment - From Bug to Improvement, because this plugin only considers parameters: it allows the user to rebuild a parametrized build without entering the parameters again.

          Sam Deane added a comment -

          Ah, so I did misunderstand the purpose of the plugin?

          Weird - I could have sworn that it used to work the way I described, but I'm obviously imagining things.

          Sam Deane added a comment - Ah, so I did misunderstand the purpose of the plugin? Weird - I could have sworn that it used to work the way I described, but I'm obviously imagining things.

          Sam Deane added a comment -

          Is there any way to achieve what I want right now (re-run the same job, using the same commit), without having to resort to dummy commits to kick it off again?

          I occasionally have to do this - if I encounter an error in our build scripts, for example.

          Sam Deane added a comment - Is there any way to achieve what I want right now (re-run the same job, using the same commit), without having to resort to dummy commits to kick it off again? I occasionally have to do this - if I encounter an error in our build scripts, for example.

          Rachel M. added a comment -

          I think there is no plugin with that feature, but I'd suggest you a workaround in your case.

          In order not to change your job configuration disabling SCM configuration, you could create another job using its workspace:

          • Create another job
          • General > Advanced... > Use custom workspace:
            Directory: $JENKINS_HOME/jobs/<under inspection job name>/workspace

          It could be a parametrized job in which you provide the job name you want to debug (e.g. parameter with name JOB_NAME_UNDER_TEST):
          Directory: $JENKINS_HOME/jobs/$JOB_NAME_UNDER_TEST/workspace

          Rachel M. added a comment - I think there is no plugin with that feature, but I'd suggest you a workaround in your case. In order not to change your job configuration disabling SCM configuration, you could create another job using its workspace: Create another job General > Advanced... > Use custom workspace: Directory: $JENKINS_HOME/jobs/ <under inspection job name> /workspace It could be a parametrized job in which you provide the job name you want to debug (e.g. parameter with name JOB_NAME_UNDER_TEST): Directory: $JENKINS_HOME/jobs/$JOB_NAME_UNDER_TEST/workspace

          I'd also like to have the functionality Sam Deane requested.

          Can we have additional checkbox "rebuild the same commit" in the rebuild page, unchecked by default to maintain backward compatibility?

          Lior Goikhburg added a comment - I'd also like to have the functionality Sam Deane requested. Can we have additional checkbox "rebuild the same commit" in the rebuild page, unchecked by default to maintain backward compatibility?

          To be frank, rebuilding on the commit of the job that the Rebuild link was clicked from feels like a basic requirement of calling the functionality that this plugin provides rebuild.

          Maybe the link that this plugin provides in a job's menu should be Re-use parameters or something.  But unless using the same commit is included in the functionality, Rebuild probably deceives more people than it doesn't.

          Brian J Murrell added a comment - To be frank, rebuilding on the commit of the job that the Rebuild link was clicked from feels like a basic requirement of calling the functionality that this plugin provides rebuild . Maybe the link that this plugin provides in a job's menu should be Re-use parameters  or something.  But unless using the same commit is included in the functionality, Rebuild probably deceives more people than it doesn't.

            ragesh_nair ragesh_nair
            samdeane Sam Deane
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: