Organization folder multiple sources not honored

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I'm working with an organization folder using the Github Branch Source Plugin. My aim is to have builds automatically start under two conditions:

      • A change is being merged to the base branch (main or master)
      • A branch has been created AND is marked as a pull request.

      To achieve this, I configure the folder to discover branches with two sets of config. I.e. I have multiple sources. The first one looks for PRs using the "Discover pull requests..." behaviour. The second looks for base merges using the "Discover branches" behaviour along with a wildcard filter. I configured it this way because I found with a single source, it was impossible to put together a single set of behaviours that met my requirements without triggering builds for all branches - PR or otherwise. 

      Expected behaviour

      Repositories that contain branches meeting either/both source criteria are created in the folder. I.e. if a repo contains PRs AND main branches, both of those things would be discovered.

      Actual behaviour

      Repositories are scanned and depending on which source criteria is met first, the other is then ignored in the future. For example, if I have a Jenkinsfile in my main branch and then do a PR, the PR is ignored because the project is now only expecting to see main branch changes. The same happens on the reverse (more realistic example)... I have a repo without a Jenkinsfile so I create a PR for it. I then merge my PR but the merge is ignored. 

            Assignee:
            Unassigned
            Reporter:
            Thomas
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: