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

Unexpected job deletion with "Exclude branches that are also filed as PRs" when opening a PR

      Given:

      Jenkins: Branch scanning with "Discover Branches Strategy" set to "Exclude branches that are also filed as PRs"

      Bitbucket: Automatic merging enabled

      When:

      Merging changes from feature/X into release/Y, where automatic merge from release/Y into master fails.

      Then:

      Bitbucket creates new PR-Z for merging release/Y into master. Jenkins deletes old release/Y job, and creates new PR-Z job. Upon PR closure, PR job is deleted and release/Y job re-created starting from BUILD_NUMBER=1

       

      The underlying issue is the ability to unintentionally delete branch jobs by simply opening a PR. As another example, it is also possible to delete master job by simply requesting master branch to be merged anywhere else.

      I don't see any nice way around this, other than introducing another type of filter that would specify "permanent/sticky" jobs - ones that will never be deleted, only disabled if no longer matched by the normal branch filter. Any thoughts?

          [JENKINS-52406] Unexpected job deletion with "Exclude branches that are also filed as PRs" when opening a PR

          Gert Palok created issue -
          Anders Hammar made changes -
          Link New: This issue is duplicated by JENKINS-65275 [ JENKINS-65275 ]
          Anders Hammar made changes -
          Component/s New: github-branch-source-plugin [ 20858 ]
          Anders Hammar made changes -
          Link New: This issue relates to JENKINS-65303 [ JENKINS-65303 ]
          Nikolas Falco made changes -
          Assignee New: Nikolas Falco [ nfalco ]
          Nikolas Falco made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Nikolas Falco made changes -
          Link New: This issue is duplicated by JENKINS-51365 [ JENKINS-51365 ]

            nfalco Nikolas Falco
            sbgerdp Gert Palok
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: