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

Build Origin PRs (merge with base branch) conducts rebuilds when baseline changes

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When 'Build Origin PRs (merge with base branch)' is selected any PR's which are filed against a base branch are re-triggered when the base branch changes.

      While this is all fine if you have a small # of PR's & the builds are quick, if you have a large team & backlog of PR's then any merge to the base branch will automatically trigger every PR which is using the same baseline.

      When you then end up with is a Jenkins that has a massive queue to process & github often complaining that you've exceeded the API rate limit.

      The concept of building the merge branch is great, however at the moment I really can't use it because of the previously stated behaviour & causes massive issues for our builds.

      Previous versions of the plugin didn't exhibit this behaviour at all, nor do other systems like travis which build PR's using the merge branch, nor did the github pull request builder plugin.

      As a workaround I'm forced to use the 'Build Origin PRs (unmerged HEAD)' and then conduct the merge or checkout of the GH merge branch itself within the pipeline which is less than ideal.

      Can we have an option to inhibit a re-trigger when the baseline changes for PRs with merge?

      btw I like where this plugin is going

        Attachments

          Issue Links

            Activity

            Hide
            stephenconnolly Stephen Connolly added a comment -

            Resolution:

            • Install Basic Branch Build Strategies plugin and add the "Change Requests" with "Ignore rebuilding merge branches when only the target branch changed" selected to your build strategies
            Show
            stephenconnolly Stephen Connolly added a comment - Resolution: Install Basic Branch Build Strategies plugin and add the "Change Requests" with "Ignore rebuilding merge branches when only the target branch changed" selected to your build strategies
            Hide
            jglick Jesse Glick added a comment -

            For safety, you may want to then configure GitHub to refuse to let PRs be merged unless they are up to date with the base branch—IOW to only permit fast-forward merges from the GUI.

            Show
            jglick Jesse Glick added a comment - For safety, you may want to then configure GitHub to refuse to let PRs be merged unless they are up to date with the base branch—IOW to only permit fast-forward merges from the GUI.
            Hide
            acejam Joshua Noble added a comment -

            I can confirm that setting up the Basic Branch Build Strategies plugin and selecting Regular Branches and Change Requests (with Ignore rebuilding merge branches checked) indeed gives us exactly what we want. Thanks for the tip!

            Show
            acejam Joshua Noble added a comment - I can confirm that setting up the Basic Branch Build Strategies plugin and selecting Regular Branches and Change Requests (with Ignore rebuilding merge branches checked) indeed gives us exactly what we want. Thanks for the tip!
            Hide
            aldochristiaan Aldo Christian added a comment -

            Stephen Connolly hey, i've installed the plugins, but i can't find the options on my multiple pipeline job .. Could you help me please ?

            Show
            aldochristiaan Aldo Christian added a comment - Stephen Connolly hey, i've installed the plugins, but i can't find the options on my multiple pipeline job .. Could you help me please ?
            Hide
            brianjmurrell Brian J Murrell added a comment - - edited

            Aldo Christian By multiple pipeline job do you mean GitHub Organisation jobs?  Because I agree, the proposed solution here doesn't seem to apply, AFAICT, to the GitHub Source Branch Plugin multibranch-pipeline job.

            So those users still need a solution to these build storms that just take down your Jenkins machine every time a base branch (i.e. master) is updated.  I guess we need another ticket.

            Show
            brianjmurrell Brian J Murrell added a comment - - edited Aldo Christian By multiple pipeline job do you mean GitHub Organisation jobs?  Because I agree, the proposed solution here doesn't seem to apply, AFAICT, to the GitHub Source Branch Plugin multibranch-pipeline job. So those users still need a solution to these build storms that just take down your Jenkins machine every time a base branch (i.e. master) is updated.  I guess we need another ticket .

              People

              • Assignee:
                Unassigned
                Reporter:
                nullify005 Lee Webb
              • Votes:
                6 Vote for this issue
                Watchers:
                21 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: