Skip to main content

promote

deploy an image built for another environment, without rebuilding

🚀 Promote an image from another environment.

Deploys an image that was already built for another environment's deployment of the same service (for example dev → prod) to this deployment, by its digest and without rebuilding, so this environment runs exactly the image that was tested there.

Name the source with --from <deployment-id> (that deployment's latest succeeded build) or --build <build-id> (a succeeded build of the same service in another environment).

The promoted image is a new build on this deployment, and this deployment's own settings apply: its variables and secrets, its pre-deploy command, and its deploy policy. When the policy is approval, the build waits for a project admin to approve it.

Only images built by ComputeSphere can be promoted, and only to a deployment that builds from source.

Public build-time values (NEXT_PUBLIC_, VITE_, REACT_APP_, PUBLIC_) are baked into an image when it is built. When the image's values differ from this environment's, the promote is refused and the differing names are listed; pass --acknowledge-build-args to promote it anyway.

Usage​

csph deployments promote <deployment-id> [flags]

Options​

Command Specific​

--account <string>
account ID
--acknowledge-build-args
promote even though the image's public build-time values differ from this environment's
--build <string>
a succeeded build of the same service in another environment
--from <string>
another environment's deployment of the same service; its latest succeeded build is promoted

-y, --yes

skip the confirmation prompt

Formatting​

For more information about formatting options, see Formatting.

-o, --output <string>

output format: [table|plain|csv|json|yaml]

Available Fields​

approved_at, approved_by, awaiting_approval_at, build_duration_seconds, built_at, cache_hit_ratio, canceled_at, commit_author, commit_message, commit_sha, created_at, declared_build_args, deployed_by, deployment_id, duration_seconds, environment_id, failure_message, failure_reason, finished_at, git_ref, id, image_digest, image_signature, image_size_bytes, manifest, mode, object, pipeline_tier, pre_deploy_command, promoted_from, reject_reason, rejected_at, rejected_by, service_id, source_kind, source_ref, started_at, status, trigger_source

Inherited​

--config <string>
config file (default is $HOME/.config/computesphere/configuration.yaml)
--debug
enable debug logging

-h, --help

show this help message

-i, --interactive

run interactively (prompts, pickers, table browser)
--log-level <string>
log level: [trace|debug|info|warn|error|fatal|panic|disabled||api]
--no-color
disable color output
--no-input
disable interactive mode

Examples​

# promote what dev runs to prod
> csph deployments promote <prod-deployment-id> --from <dev-deployment-id>

# promote one specific build
> csph deployments promote <prod-deployment-id> --build <build-id>

# promote in CI, without the prompt, and print the new build as JSON
> csph deployments promote <prod-deployment-id> --from <dev-deployment-id> --yes -o json

See also​