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

Jobs for branches with PRs are removed although they still exist

XMLWordPrintable

      For a multibranch pipeline job, we see that branches in the git repo where there is a PR created will be removed when "discard old items" is enabled. This is surprising as the text states:

      Jobs for removed SCM heads (i.e. deleted branches) can be removed immediately or kept based on a desired retention strategy.

      Also, probably related, we have "Exclude branches that are also files as PRs" selected as Discover branches strategy.

      So for a scenario where a PR has been created from branch A, I guess what is happening is that the discover strategy creates a new job for the PR and disables the job for branch A. Then it looks like the discard logic removes the job for branch A. EVen though branch A very much still exists and that is not correct according to the text. Only jobs for branches that have been deleted should be discarded/removed.

      I don't know if the problem is in bitbucket-branch-source-plugin or in branch-api.

            Unassigned Unassigned
            ahammar Anders Hammar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: