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

XMLWordPrintable

      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?

            Unassigned Unassigned
            sbgerdp Gert Palok
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: