cub variant approve
cub variant approve
Approve the deployable units of a variant
Synopsis
Approve every unit of a variant space that can be released.
Approval is per unit and per revision, so approving a variant that a change has just reached otherwise means naming its units. This approves the whole variant in one step: the review is of the change that arrived, and the change arrived across the space.
By default the units with a Target are approved -- what a release of this space would publish. A base has no Target, so "TargetID IS NOT NULL" selects nothing there; pass --all to approve regardless, which is what a base being reviewed before its deployments take the change wants.
--where narrows the selection further, ANDed with the default. --revision approves a revision other than each unit's head, which is what a review of an already-superseded change needs; it takes the same forms "cub unit approve --revision" does.
A vet-approvedby Trigger is what makes approval load-bearing: it attaches an ApplyGate to every revision with too few approvals, and "cub release publish" refuses while a gate is on. Approving clears the gate for the revision approved and no other, so a later change is gated again without anyone re-arming anything.
Approving waits for the space's Triggers to finish evaluating before returning, because publishing is what usually comes next and a publish issued while evaluation is pending fails on the transient "awaiting/triggers" gate rather than on anything real. Pass --no-wait to return as soon as the approvals are recorded.
Examples:
# Approve the change that has reached this variant, then release it.
cub variant approve apptique-dev
cub release publish apptique-dev
# Approve only the workloads.
cub variant approve apptique-prod --where "Slug LIKE 'deployment-%'"
# Approve the revision a release pinned, rather than each unit's head.
cub variant approve apptique-prod --revision LastReleasedRevisionNum
# Approve a base, which has no targets of its own.
cub variant approve apptique-base --all
cub variant approve [<space>] [flags]
Options
--all approve every unit in the space, not only the ones with a Target
-h, --help help for approve
--no-wait return as soon as the approvals are recorded, without waiting for triggers to finish evaluating
-o, --output string Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
--quiet No default output.
--revision string revision to approve (defaults to each unit's head); a number, LastReleasedRevisionNum, Tag:slug, or ChangeSet:slug
--verbose Detailed output, additive with default output
--where string Filter expression using SQL-inspired syntax. Supports conjunctions with AND. String operators: =, !=, <, >, <=, >=, LIKE, NOT LIKE, ILIKE, ~~, !~~, ~, ~*, !~, !~*. Pattern matching with LIKE/ILIKE uses % and _ wildcards. Regex operators (~, ~*, !~, !~*) support POSIX regular expressions. A related entity is referenced by prefix, as in "UpstreamUnit.Slug = 'base'"; when the reference names a list, a * segment matches any element, as in "FromLink.*.Slug = 'upgrade-app'". Examples: "Slug LIKE 'app-%'", "DisplayName ILIKE '%backend%'", "Slug ~ '^[a-z]+-[0-9]+$'"
Options inherited from parent commands
--context string The context to use for this command
--debug Debug output
SEE ALSO
- cub variant - Variant commands