cub changeworkflow update
cub changeworkflow update
Update a change workflow or multiple change workflows
Synopsis
Update a change workflow or multiple change workflows using bulk operations.
A workflow is edited in place rather than versioned, and a promotion reads it as it stands. Editing one part way through a rollout therefore changes the rules a change already started under; a rollout that must not move is served by cloning the workflow and pointing the new change orders at the clone.
Single change workflow update:
# Replace the stages with the ones named, gating each of them alike
cub changeworkflow update --space workflows myapp-main-line \
--stage dev --stage staging --stage prod --prerequisites Released
# Replace the whole workflow from a file
cub changeworkflow update --space workflows myapp-main-line --filename workflow.yaml
Bulk update with --patch:
Update multiple change workflows at once based on search criteria. Requires --patch with no positional arguments.
Examples:
# Label every workflow whose last stage gates on live status
cub changeworkflow update --patch --where "Final.Prerequisites ? 'Healthy'" --label Gated=true
# Patch specific workflows from JSON
echo '{"Final": {"Prerequisites": ["Released"]}}' | cub changeworkflow update --patch \
--changeworkflow myapp-main-line --from-stdin
cub changeworkflow update [<slug or id>] [options...] [flags]
Options
--annotation strings annotations in key=value format; can separate by commas and/or use multiple instances of the flag
--changeworkflow strings target specific change workflows by slug or UUID for bulk patch (can be repeated or comma-separated)
--delete-gate strings delete gates in key[=true] format; can separate by commas and/or use multiple instances of the flag
--filename string Read the ConfigHub entity JSON from file, URL (https://), or stdin (-); mutually exclusive with --from-stdin
--filter string Filter entity to apply to the list. Specify as 'space/filter' for cross-space filters or just 'filter' for current space. Supports both slugs and UUIDs. The filter will be combined with any --where clause using AND logic. Examples: "production-filters/security-check", "my-filter-uuid", "validation-rules"
--from-stdin Read the ConfigHub entity JSON (e.g., retrieved with cub <entity> get --quiet --json) from stdin; merged with command arguments on create, and merged with command arguments and existing entity on update
-h, --help help for update
--label strings labels in key=value format; can separate by commas and/or use multiple instances of the flag
-o, --output string Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
--patch use patch API for individual or bulk operations
--prerequisites strings gates given to every stage and to the final stage (can be repeated or comma-separated); requires --stage
--quiet No default output.
--replace Replace entity instead of merging when using --from-stdin or --filename
--stage strings replace the stages with the ones named (can be repeated or comma-separated), given in the order a change is promoted through them
--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
--space string space to operate in, by slug or UUID. Omitted, a list or bulk operation spans the organization and a single entity is named as <space>/<slug>
SEE ALSO
- cub changeworkflow - ChangeWorkflow commands