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

BitBucket: Add and option to enable/disable pull requests from origin repository

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If a developer creates a feature branch and a corresponding Pull-Request, we wind up with two jobs doing basically the same thing. Once for the branch itself, and one labeled with the Pull Request Number.

      Scenario: Create a feature/whatever and open a PR to merge to master:

      • When a feature/whatever branch is created a build is trigger.
      • When a PR is open to merge feature/whatever to development, the PR project is created in Jenkins, triggering the "same build" as above.

      It would be nice to have the option to disable this behavior.

        Attachments

          Issue Links

            Activity

            allan_burdajewicz Allan BURDAJEWICZ created issue -
            Hide
            mottaviani Mark Ottaviani added a comment -

            To capture some of Jesse Glick's notes on this:

            This is about avoiding creation of duplicate branch projects for “origin” PRs, which should be a explicit option, if not the default

            Show
            mottaviani Mark Ottaviani added a comment - To capture some of Jesse Glick 's notes on this: This is about avoiding creation of duplicate branch projects for “origin” PRs, which should be a explicit option, if not the default
            Hide
            maximkulkin Maxim Kulkin added a comment -

            Same here. Actually, for building PRs I plan to use a slightly different multibranch project (which merges PR into target branch and builds the result) or even use Bitbucket Pullrequest Builder plugin (which does that). So I would like to be able to include/exclude branches and/or PRs.

            Show
            maximkulkin Maxim Kulkin added a comment - Same here. Actually, for building PRs I plan to use a slightly different multibranch project (which merges PR into target branch and builds the result) or even use Bitbucket Pullrequest Builder plugin (which does that). So I would like to be able to include/exclude branches and/or PRs.
            Hide
            mottaviani Mark Ottaviani added a comment - - edited

            If it's helpful for anyone running into this issue, we're using this at the top of our Jenkinsfiles as a temporary workaround. These projects don't get Pull requests from outside of origin/ so if you do, then you'll probably want something a little different here.

            if ((env.BRANCH_NAME.substring(0,3)) == 'PR-') {
                manager.addInfoBadge("Duplicate Job, see the job with your branch name.")
                manager.buildSuccess()
                return
             }
            
            Show
            mottaviani Mark Ottaviani added a comment - - edited If it's helpful for anyone running into this issue, we're using this at the top of our Jenkinsfiles as a temporary workaround. These projects don't get Pull requests from outside of origin/ so if you do, then you'll probably want something a little different here. if ((env.BRANCH_NAME.substring(0,3)) == 'PR-' ) { manager.addInfoBadge( "Duplicate Job, see the job with your branch name." ) manager.buildSuccess() return }
            recena Manuel Recena Soto made changes -
            Field Original Value New Value
            Link This issue is duplicated by JENKINS-33161 [ JENKINS-33161 ]
            recena Manuel Recena Soto made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            Hide
            amuniz Antonio Muñiz added a comment -

            Manuel Recena Soto why did you close this?

            Show
            amuniz Antonio Muñiz added a comment - Manuel Recena Soto why did you close this?
            amuniz Antonio Muñiz made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            amuniz Antonio Muñiz made changes -
            Link This issue is duplicated by JENKINS-33161 [ JENKINS-33161 ]
            Hide
            recena Manuel Recena Soto added a comment -

            Antonio Muñiz It is duplicated.

            Show
            recena Manuel Recena Soto added a comment - Antonio Muñiz It is duplicated.
            Hide
            amuniz Antonio Muñiz added a comment -

            No.

            Show
            amuniz Antonio Muñiz added a comment - No.
            Hide
            recena Manuel Recena Soto added a comment -

            Antonio Muñiz I'm sorry, I did not see that this issue is the same than JENKINS-33161 but for Bitbucket.

            Show
            recena Manuel Recena Soto added a comment - Antonio Muñiz I'm sorry, I did not see that this issue is the same than JENKINS-33161 but for Bitbucket.
            Hide
            amuniz Antonio Muñiz added a comment -

            This issue will be likely covered by JENKINS-36283

            Show
            amuniz Antonio Muñiz added a comment - This issue will be likely covered by JENKINS-36283
            amuniz Antonio Muñiz made changes -
            Link This issue is related to JENKINS-36283 [ JENKINS-36283 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 169712 ] JNJira + In-Review [ 186350 ]
            stephenconnolly Stephen Connolly made changes -
            Summary Add and option to enable/disable pull requests from origin repository BitBucket: Add and option to enable/disable pull requests from origin repository
            Hide
            jamesdumay James Dumay added a comment -

            I believe JENKINS-43507 contains this functionality and is due to be released in a few weeks.

            Show
            jamesdumay James Dumay added a comment - I believe JENKINS-43507 contains this functionality and is due to be released in a few weeks.
            jamesdumay James Dumay made changes -
            Link This issue duplicates JENKINS-43507 [ JENKINS-43507 ]
            jamesdumay James Dumay made changes -
            Resolution Duplicate [ 3 ]
            Status Reopened [ 4 ] Resolved [ 5 ]

              People

              Assignee:
              amuniz Antonio Muñiz
              Reporter:
              allan_burdajewicz Allan BURDAJEWICZ
              Votes:
              7 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: