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

Jobs for branches with PRs are removed although they still exist

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            ahammar Anders Hammar added a comment -

            This behavior is a problem when GitFlow or similar is used as jobs for branches like 'candidate' are removed when changes are "moved" to the next branch (via a PR).

            Show
            ahammar Anders Hammar added a comment - This behavior is a problem when GitFlow or similar is used as jobs for branches like 'candidate' are removed when changes are "moved" to the next branch (via a PR).
            Hide
            ahammar Anders Hammar added a comment -

            This is a duplicate of JENKINS-52406.

            Show
            ahammar Anders Hammar added a comment - This is a duplicate of JENKINS-52406 .

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ahammar Anders Hammar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: