CloudBees CI Disable SCM polling for the repository that I check out in my pipeline

Last Reviewed:2025-07-30()
1 minute readKnowledge base

Issue

I have a pipeline job that pulls the Jenkinsfile from repo-A in my SCM provider. In my pipeline, I check out another repository (repo-B), as shown in the snippet below:

stage('Checkout repo-B') { steps { checkout scm: scmGit(branches: [[name: '*/<your-branch-name>']], extensions: [], userRemoteConfigs: [[credentialsId: '<your-credentials-id>', url: '<repo-B-url>']]) } }

I want the job to trigger when a change to repo-A repository is pushed, but I don’t want it to trigger when repo-B changes.

Resolution

On the one hand, to have the pipeline triggered when a change to repo-A is made, you need either a Webhook or configure your pipeline to poll changes in the SCM. Webhooks are preferred over SCM polling because every polling requires the controller to scan the entire workspace and verify it with the SCM server, thus becoming an expensive operation.

On the other hand, to disable the trigger of the pipeline based on changes to repo-B, you have to disable polling and changelog inclusion for the pipeline like in the following example:

stage('Checkout repo-B') { steps { checkout changelog: false, poll: false, scm: scmGit(branches: [[name: '*/<your-branch-name>']], extensions: [], userRemoteConfigs: [[credentialsId: '<your-credentials-id>', url: '<your-repo-url>']]) } }

Tested product/plugin versions

  • CloudBees CI on modern cloud platforms - managed controller 2.504.3.28224