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​
Formatting​
For more information about formatting options, see Formatting.
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​
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​
- csph deployments — manage deployments
- csph deployments get — get deployments
- csph deployments logs — view deployment logs (runtime, build, or deploy)
- csph deployments list — list deployments
- csph deployments update — update deployments
- csph deployments delete — delete deployments
- csph deployments start — start a deployment
- csph deployments stop — stop a deployment
- csph deployments restart — restart a deployment
- csph deployments redeploy — redeploy a deployment
- csph deployments rollback — roll a deployment back to a previous version
- csph deployments scale — scale a deployment to a target spherelet count
- csph deployments port — update the port of a deployment
- csph deployments domains — manage a deployment's custom domains
- csph deployments builds — manage a deployment's builds
- csph deployments runs — start and manage runs
- csph deployments default-url — turn the deployment's default URL off or on