cub variant tag
cub variant tag
Add, move or remove a tag on the units of one or more variants
Synopsis
Add a tag to a revision of each unit in one or more variant spaces, move it, or remove it.
The spaces are the variant named as an argument, or those --where-space selects, or those --change-order names -- its origins and the spaces it is headed for -- narrowed to one stage of its change workflow with --stage. These combine as an intersection. --where narrows the units further.
The tag is a slug, looked up in the variant's space when one is named, a space/slug, or a
UUID. ChangeOrder:
--revision says which revision of each unit to tag, as for "cub unit tag": HeadRevisionNum
(the default), LastReleasedRevisionNum, a number, Tag:
--move moves the tag from the revision it marks on each unit to the one --revision names. A move, or a removal, acts on the units the tag marks in the selected spaces and leaves the others alone. Tags a changeset, a change order or a release made cannot be added or removed; a change order's release tag can be moved, to adopt a revision made after the promotion -- a fix made in review -- before the change is released. It cannot move to a revision before the one the change order's end tag marks or the unit's last released revision, to one with validation errors, or at all in a space where a release has been published at it.
Examples:
# Tag the head revision of every unit of a variant.
cub variant tag apptique/prod pre-tls-change
# Remove that tag again.
cub variant tag apptique/prod pre-tls-change --revision -
# A fix made in review in staging: move the change's release tag to the fixed revisions.
cub variant tag ChangeOrder:apptique-base/bump-image --move --stage staging
# The same, in one space, for the workloads only.
cub variant tag apptique-staging ChangeOrder:apptique-base/bump-image --move --where "Slug LIKE 'deployment-%'"
cub variant tag [<variant>] <tag> [flags]
Options
--change-order string select this change order's space and the spaces it is headed for; implied by a ChangeOrder:<slug> tag
-h, --help help for tag
--include-hidden string[="*"] Also select hidden entities, to list or to act on: those hidden for the given HiddenReasons, comma-separated, as in --include-hidden=BackingUnit, or for any reason but Archived when given no value or "*". ConfigHub/YAML Units, which hold the configuration of other entities, are hidden with the reason BackingUnit. Archived entities are selected only when the reasons name Archived, as in --include-hidden=Archived or --include-hidden='*,Archived'. A --where naming entities by Slug or ID lists them whether hidden or not, but a bulk operation acts on archived ones only when --include-hidden names Archived
--move move the tag from the revision it marks on each unit to --revision; the only way to move a change order's release tag (ChangeOrder:slug)
--revision string which revision of each unit to tag: HeadRevisionNum, LastReleasedRevisionNum, a number, Tag:slug, ChangeSet:slug, ChangeOrder:slug, any of those prefixed with Before:, or - to remove the tag (default "HeadRevisionNum")
--stage string select the spaces of this stage of the change order's workflow
--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]+$'". 'cub <entity> explain --where' lists the attributes an entity's expressions can name
--where-space string select the spaces with a where expression over spaces
Options inherited from parent commands
--context string The context to use for this command
--debug Debug output
SEE ALSO
- cub variant - Variant commands