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

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            stephenconnolly 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.

            Show
            stephenconnolly 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.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: