cub unit push-upgrade
cub unit push-upgrade
Upgrade downstreams from unit
Synopsis
Upgrade all downstream units that depend on the specified upstream unit. This command finds all units that have the specified unit as their upstream source and upgrades them to match the latest version if they are behind.
The push-upgrade operation only affects downstream units where:
- Unit.UpstreamUnitID matches the specified unit
- Unit.UpstreamRevisionNum is less than the upstream unit's HeadRevisionNum
This is useful for propagating changes from a template or base configuration to all dependent units across your infrastructure.
Examples:
# Upgrade all downstream units from a template unit
cub unit push-upgrade --space my-space base-template
# Upgrade downstream units with verbose output showing details
cub unit push-upgrade --space my-space base-template --verbose
# Upgrade and get JSON response for programmatic use
cub unit push-upgrade --space my-space base-template --json
# Upgrade with specific field selection using jq
cub unit push-upgrade --space my-space base-template --jq '.[] | select(.Unit) | .Unit | {Slug, UnitID, HeadRevisionNum}'
cub unit push-upgrade <name> [flags]
Options
--annotation strings annotations in key=value format; can separate by commas and/or use multiple instances of the flag
--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
--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 push-upgrade
--jq string jq expression, suppressing default output
--json JSON output, suppressing default output
--label strings labels in key=value format; can separate by commas and/or use multiple instances of the flag
--quiet No default output.
--replace Replace entity instead of merging when using --from-stdin or --filename
--timeout string completion timeout as a duration with units, such as 10s or 2m (default "10m0s")
--verbose Detailed output, additive with default output
--wait wait for completion (default true)
--yaml YAML output, suppressing default output
--yq string yq expression, suppressing 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
- cub unit - Unit commands