Jenkins: Scan Multibranch Pipeline Without Build

If you click on the “Scan Multibranch Pipeline Now” link in the Jenkins dashboard to discover the new branches, by default, this will automatically trigger builds for all newly discovered branches.

In this short note i am showing how to disable automatic job triggering during SCM scanning for the new branches.

Cool Tip: Decrypt secrets masked by Jenkins credentials plugin! Read More →

Scan Multibranch Pipeline Without Build

Go to the configuration settings of your multibranch pipeline and in the “Branch Sources” section click on the “Add property” and select the property, named “Suppress automatic SCM triggering“.

This will prevent Jenkins from triggering the builds every time it discovers new branches.

NoTriggerBranchProperty: Suppresses builds due to either BranchIndexingCause or BranchEventCause. The purpose of this property is to prevent triggering builds resulting from the detection of changes in the underlying SCM.

One Reply to “Jenkins: Scan Multibranch Pipeline Without Build”

  1. Hi,
    Awesome article! I’m searching to a solution for blocking Jenkins from automatically build when scan multibranches pipeline. The reasons is we have a very consumed-resources pipeline from angular project. So when it build at the same time, the system crash.

    It looks like the Suppress automatic SCM triggering might help us. But in our case, we’d like to trigger the build only new branch, leave the old one trigger manually.

    For example, I will use Suppress automatic SCM for all feature/** (invert) for disable auto build for all the projects excepted feature. But the problem is, it still effects on all the branches start with feature* not the feature/.

    What should I do?

Leave a Reply