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

Problem with git polling on multiple repo. Need to poll specific repo and exclude other repos in jenkins pipeline

      I have an issue in the pipeline script, I am using two git repos to checkout a specific branch respectively under one stage initially. I have scheduled poll with " * * * * * " value. I only want the first repo to be polled and job be rebuilt. So I have enabled git poll: false for second repo. But still the git polling checks both repos and builds job when there is change in second repo too. So how can I build a job which multiple repos to checkout and poll a specific repo and trigger another job.

          [JENKINS-41674] Problem with git polling on multiple repo. Need to poll specific repo and exclude other repos in jenkins pipeline

          When you configure multiple sources in a multibranch project, those multiple sources are a priority list of sources. NOT a list of sources that should all be checked out.

          The design behaviour is that the first wins. We will not be changing that core behaviour.

          It does seem to me, however, that you may have a different problem from the one you describe.
          I think your actual problem is JENKINS-32018, whereby your project requires two separate repositories to be checked out in order to build.

          Currently, the best way to approach this issue is to have one "primary" repo as the only listed source. Then use the resolveScm step to resolve the matching branch names on the second repository and use checkout to checkout the matching branch. The only downside of this approach is that you do not get SCM trigger support on the second repository.

          Stephen Connolly added a comment - When you configure multiple sources in a multibranch project, those multiple sources are a priority list of sources. NOT a list of sources that should all be checked out . The design behaviour is that the first wins. We will not be changing that core behaviour. It does seem to me, however, that you may have a different problem from the one you describe. I think your actual problem is JENKINS-32018 , whereby your project requires two separate repositories to be checked out in order to build. Currently, the best way to approach this issue is to have one "primary" repo as the only listed source. Then use the resolveScm step to resolve the matching branch names on the second repository and use checkout to checkout the matching branch. The only downside of this approach is that you do not get SCM trigger support on the second repository.

            Unassigned Unassigned
            swaroopmc Swaroop Aradhya
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: