Skip to main content

csph deployments get

get deployment

🚀 Retrieve a deployment. The deployment is a snapshot of the service in some environment at a specific point in time. The deployment includes the service's configuration, the environment's configuration, and the service's status.

The deployment ID is a unique identifier for the deployment. You can use the deployment ID to retrieve a specific deployment. Also, a deployment can be retrieved by specifying the service ID and the environment ID where the service is deployed.

For a service built from git it also shows where the code comes from (repository, branch, the git connection that clones it, and the directory in a monorepo) and how it builds (docker with its Dockerfile and context, or native with its toolchain). In JSON these are source and build. The setting names the deployment gets are listed by csph deployments env list <deployment-id>.

"auto-deploy" says whether a push to the branch builds and deploys the service: "on", or "paused since <time>" (a rollback pauses it). Turn it back on with csph deployments autodeploy resume <deployment-id>. In JSON these are autodeploy and autodeploy_paused_at.

Usage​

csph deployments get [flags]

Aliases​

deployments get, deployments show, deployment get, deployment show, deploys get, deploys show

Options​

Command Specific​

--account <string>
account ID
--environment <string>
environment ID (required)
--service <string>
service ID (required)

Formatting​

For more information about formatting options, see Formatting.

--fields <strings>
output JSON with the specified fields
--jq <string>
filter JSON output with jq expression

-o, --output <string>

output format: [table|plain|csv|json|yaml]
--template <string>
format JSON using a Go template

Available Fields​

build_args, source, build, autodeploy, autodeploy_paused_at, access, env_id, environment, hooks, id, instance_type, instance_type_detail, last_deployed_at, name, object, service_id, service_name, service_type, sphere_count, status, type

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​

# retrieve a deployment interactively
> csph deployments get

# retrieve a deployment by ID
> csph deployments get <deployment-id>

# where a service's code comes from and how it builds, for a move
> csph deployments get <deployment-id> -o json --jq '{source, build}'

# retrieve a deployment of a service in an environment
> csph deployments get --service <service-id> --environment <environment-id>

See also​