Skip to main content
Pushing every artifact on every green build is slow and introduces risk: you may push a binary whose inputs did not change, overwriting a known-good artifact with an identical but unverified one. You want to push only the artifacts whose build outputs actually changed since the last release. Selective Delivery determines what changed using the content hash of each build output — not the git SHA or a timestamp. If Bazel produces the same output digest for a target, that target is not pushed, even if unrelated files changed in the same commit. This is the same cache-key logic Bazel uses internally, applied at delivery time. In practice, Selective Delivery works as follows:
  • Triggers on green builds of release branches (such as main). Non-release branches and failing builds are skipped.
  • Compares output digests against the prior release to determine which targets actually changed.
  • Rebuilds only the changed targets with version-control stamping enabled, so the pushed artifact carries the correct build metadata.
  • Runs push logic to upload each changed artifact to its configured destination — a container registry, object store, or other target.
To learn more about Selective Delivery, see the Stamping Bazel builds with selective delivery article.
Selective Delivery is implemented as the aspect delivery AXL task. The task page covers configuration, the delivery script contract, and how to wire it into your CI pipeline.