proomt

Search

Search posts, papers, and topics

All posts

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

Related reading

  1. Setting Up Jenkins EC2 Agents

    The article walks through configuring Jenkins to launch EC2 instances as build agents on demand, covering AWS IAM setup, security groups, key pairs, AMI selection, and the Jenkins EC2 plugin configuration. It shows how idle termination can keep costs low while providing elastic build capacity.

    Codeshipcloudbees.com6 min
  2. Copying Artifacts Between Builds in a Jenkins Workflow

    The copyartifact plugin now supports Jenkins Pipeline via a core step (v1.34). Use the generic `step([$class: 'CopyArtifact', …])` syntax to pull artifacts from another job, with all existing options available through the Snippet Generator. A native pipeline step is planned.

    Codeshipcloudbees.com1 min
  3. Build Hints That Fail Before the Build Server

    Codename One moved 87 common build hints into Java annotations, so misspelled keys or wrong value types cause compile‑time errors instead of silent build‑server ignores. The annotations are processed back into the existing string protocol, keeping backward compatibility while improving validation and IDE support.

    CodeName Onecodenameone.com6 min
  4. Health Check-up for Your Jenkins

    Kohsuke Kawaguchi outlines a few low‑effort ways to keep a Jenkins instance healthy: use jconsole to watch old‑gen heap usage, the Monitoring plugin (or Nagios) to record HTTP latency and queue length, inspect thread dumps for slow pages, and review the built‑in load chart to spot agent under‑/over‑utilisation.

    Codeshipcloudbees.com3 min