Skip to content

cub release publish

cub release publish

Publish a release

Synopsis

Publish a Release for the Space's release Target, bundling the Units in that are assigned to that Target.

is the Space whose Units are bundled (and becomes the Release's Space); a Space ID is also accepted. The consuming Target is the Space's ReleaseTargetID, set via cub space create/update --release-target.

By default each bundled Unit is captured at its head Revision. Pass --revision to instead pin each Unit to the highest-numbered Revision carrying a Tag; a Unit with no matching tagged Revision falls back to its head Revision.

Each Unit's Revision is selected by Tag, so what --revision names has to come down to one Tag. A Tag does; so do the boundaries of a ChangeSet and a ChangeOrder, which is how a whole change is released rather than a Revision number that means something different in every Unit:

--revision | Tag: the Revision that Tag marks --revision ChangeSet: where a Closed ChangeSet ended --revision Before:ChangeSet: the state it started from --revision ChangeOrder: where the change arrived --revision Before:ChangeOrder: the state before it

A revision number, a Revision ID and the named revisions each pick out a Revision of one Unit, so they are not accepted. Slugs resolve like any other entity slug: in --space, or in the context's default Space, unless qualified as space/slug.

--label, --annotation and --delete-gate set the Release's metadata at publish time; cub release update can change it afterwards. The bundled content itself is fixed once published, and so is --bundle-base-name: the release's OCI manifest records the name, so it can only be set here.

Examples:

  cub release publish my-space

  # Bundle each Unit at the Revision tagged "v1.2.0"
  cub release publish --revision v1.2.0 my-space

  # Bundle each Unit at the Revision a closed ChangeSet ended on
  cub release publish --revision ChangeSet:rollout-42 my-space

  # Release the state a promotion started from, to roll it back
  cub release publish --revision Before:ChangeOrder:bump-base-image my-space

  # Publish with metadata, and a gate that blocks deleting the Release
  cub release publish --label env=prod --annotation ticket=OPS-1234 my-space
  cub release publish --delete-gate retention/30-days my-space
cub release publish <space-slug> [flags]

Options

      --annotation strings        annotations in key=value format; can separate by commas and/or use multiple instances of the flag
      --bundle-base-name string   base filename for the release's stored bundle, without the .tar.gz suffix; defaults to the bundled Unit's slug for a single-Unit release and to the Space's slug otherwise
      --delete-gate strings       delete gates in key[=true] format; can separate by commas and/or use multiple instances of the flag
  -h, --help                      help for publish
      --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>
      --quiet                     No default output.
      --revision string           Which tagged Revision to bundle for each Unit, as a Tag (slug, Tag:slug, space/slug or Tag ID) or as a ChangeSet:slug or ChangeOrder:slug boundary, optionally prefixed with Before:. Units without a matching tagged Revision fall back to their head Revision.
      --verbose                   Detailed output, additive with default output

Options inherited from parent commands

      --context string   The context to use for this command
      --debug            Debug output
      --space string     space ID to perform command on

SEE ALSO