Skip to content

How to enable delta deployments for a stage

By default every deploy is full. Opt a stage into delta — deploying only the git diff — with a single repository variable. Read delta deployments for what this changes.

Turn it on

Add a repository variable:

DELTA_DEPLOY_<NAME> = true

<NAME> is the run's stage as the environment variable reference defines it. For the standard chain:

Stage Variable
SIT DELTA_DEPLOY_SIT
UAT DELTA_DEPLOY_UAT
PRODUCTION DELTA_DEPLOY_PRODUCTION

That is the whole switch: deploys and PR validations on that stage deploy only the changed components, at test level RunRelevantTests.

If the org's Apex was installed from a package, RunRelevantTests finds no tests for it. Add a second repository variable so the delta runs the deploy's configured tests instead:

DELTA_TEST_LEVEL = RunSpecifiedTestSuites

See DELTA_TEST_LEVEL for the accepted values and why the inference misses package-installed classes.

Turn it off

Unset (or set to anything non-truthy) the variable. There is no separate "force full" flag — absence of the opt-in is full deployment.

What to expect

Base refs, destructive changes and the fallback to a full deploy are described in delta: deploy only the diff and the fallback ladder.

Pooled scratch validation is the same switch, different name

To delta-validate pull requests against a pooled scratch org, set DELTA_DEPLOY_SCRATCH=true (the scratch validation step self-identifies as the SCRATCH stage). The pool must have a seedBaseline; see validate a PR against a scratch org.