> ## Documentation Index
> Fetch the complete documentation index at: https://aspect.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Selective delivery

> Push only the artifacts whose Bazel output digests changed, to your bucket or container registry.

Selective delivery is a feature of the Aspect CLI's [`aspect delivery`](https://aspect.build/docs/cli/tasks/delivery) task, on [Aspect Cloud](https://aspect.build/docs/aspect-workflows/cloud/overview.md) and [Aspect Enterprise](https://aspect.build/docs/aspect-workflows/enterprise/overview.md). It keeps delivery state in Aspect's delivery API, or, on [Workflows runners](https://aspect.build/docs/aspect-workflows/platform/features/ci-runners.md), in the selective delivery service that runs alongside them. [Where deliveries are stored](https://aspect.build/docs/cli/guides/delivery-manifest.md#where-deliveries-are-stored) covers both.

It pushes only the targets whose Bazel-built outputs changed. Pushing every artifact on every green build wastes CI time and registry storage, and overwrites known-good artifacts with identical but unverified rebuilds.

## How it works

Selective delivery decides what changed from 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 isn't pushed, even if unrelated files changed in the same commit.

A delivery run:

* **Runs on green builds of the branches you choose.** `main` is typical. Your CI configuration decides which branches and tags it runs on, and which build and test jobs it waits for.
* **Compares output digests** against the prior release to find the targets whose outputs changed. With Build without the Bytes, the comparison works from hashes alone and never downloads an artifact.
* **Builds the changed targets** with version-control stamping, so each pushed artifact carries the correct build metadata.
* **Pushes in parallel**, uploading each changed artifact to its destination: a container registry, an object store, or anything else your delivery script targets.
* **Writes a delivery manifest**: a record of every target's outcome and CI metadata, uploaded as a CI artifact. You can [enrich it with AXL hooks](https://aspect.build/docs/cli/guides/delivery-manifest.md), for example to attach OCI image digests or feed deployment tooling.

## Why digests, not git SHAs

Stamping is the usual obstacle: if every artifact embeds the commit SHA, every artifact differs on every commit and nothing can be skipped. Selective delivery compares *unstamped* outputs to detect change, then rebuilds only the changed targets *with* stamping for the push. Each delivered artifact traces back to the commit that produced it.

## Configuring your repository

The [`aspect delivery`](https://aspect.build/docs/cli/tasks/delivery) task drives it from your pipeline. The task page covers configuration, the delivery script contract, and how to wire it into CI. A new deliverable is a new Bazel target, so each team configures and maintains its own.

> [!TIP]
>
> For the stamping problem in depth, see [Stamping Bazel builds with selective delivery](https://aspect.build/blog/stamping-bazel-builds-with-selective-delivery).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.