Skip to content

kindgi promote

View as Markdown

Synopsis

Terminal window
kindgi promote --from=<env> --to=<env> [--deployment=<id>] [--reason=<text>] [--check] [--make-live [--wait[=<duration>]]] [--path=<dir>]
Signature

Move a build to the next environment of its environment order, staging to prod, say: the same signed image, with the edits made since to its agents and flows. Prints what moves, then each value the build needs there that isn't set, with the command that sets it; exits 1 while one isn't. --check stops before moving anything. With --make-live, exits 3 when a carried version doesn't go live: held by the gate, or waiting for an approval (--wait waits for the decision). In a pack, --from and --to are its environment names; outside one, project ids or slugs.

Options

Option Default Description
--check off What would move, and the values not set in --to. Changes nothing.
--deployment <value> none (the one deployment serving in --from; in a pack, of this pack) The deployment to promote. Default: the one deployment serving in --from (in a pack, of this pack).
--from <value> required The environment the build serves in: its name in your pack config, or outside a pack a project id or slug.
--make-live off Make every agent version the promotion carries live in --to, each through its scope's gate, and pin every flow version it carries there. Prints each, and any waiting on a gate; exits 3 when one doesn't go live.
--path <value> the current directory The pack root. Default: the current directory.
--reason <value> none Why, kept on the audit record.
--to <value> required The next environment of the order: its name in your pack config, or outside a pack a project id or slug.
--wait <value> off; a bare --wait waits at most 1h When a version waits for an approval, wait until a reviewer decides: at most the duration given (90s, 30m, 2h), 1h when none is. Exits 0 once it goes live, and 3 when it is rejected, its approval expires, it is superseded or the wait runs out, and 1 when 3 reads of the promotion in a row fail. An approval stays open after the wait.

Every command also takes the global flags.

Examples

Promote the build serving in staging to prod, saying why.

Terminal window
kindgi promote --from=staging --to=prod --reason="release 12"

Promote to prod and make each agent the build carries live there, each through its release gate policy.

Terminal window
kindgi promote --from=staging --to=prod --make-live --reason="release 12"

See what would move to prod and which values it lacks, changing nothing.

Terminal window
kindgi promote --from=staging --to=prod --check

Outside a pack, name the two environments by project slug or id.

Terminal window
kindgi promote --from=acme-staging --to=acme-prod

From Ship a pack from CI:

Terminal window
pnpm exec kindgi promote --from=staging --to=prod --check
pnpm exec kindgi promote --from=staging --to=prod --reason="Passed in staging"

See also