CodeshipFélix Belzunce Arcos2 min readintermediate
Skipping the first build on first branch indexing
Summary
Jenkins now supports a build‑branch strategy to skip the initial build that runs when a multibranch job first indexes its branches. Install branch‑api 2.3.0+ and basic‑branch‑build‑strategies 1.3.0+, then enable **Skip initial build on first branch indexing** in the job’s Build strategies UI. The strategy works by overriding `BranchBuildStrategy.isAutomaticBuild` in the plugin code.
- The feature ships in branch‑api 2.3.0 and basic‑branch‑build‑strategies 1.3.0; older Jenkins installations won’t see the option.
- Enabling the strategy stops the default “first‑index‑always‑build” behavior, saving compute for large Bitbucket orgs with many repos/branches.
- Contributing new strategies is straightforward: implement a subclass of `BranchBuildStrategy` and override `isAutomaticBuild` with the SCM context you need.
Enterprises with thousands of branches can waste CI resources on a build that merely reflects the current state of the code. Skipping that initial build reduces queue pressure and cost without affecting PR validation, which only runs on subsequent changes.
5/10