Skip to main content

create

start a build of a deployment

🏗️ Start a build of a deployment.

The build runs from the deployment's current manifest, sent as-is: nothing in it changes. A manifest with watch_paths only builds when a changed file matches them; --force builds anyway.

The command returns as soon as the build is queued. Add --wait to follow it until it succeeds, fails or is canceled: progress goes to stderr and the final build to stdout, in any --output format. With --wait the exit code says how it ended:

0 succeeded 1 failed or canceled 8 still running when --wait-timeout ran out, or waiting for an approval

Read the build's output with csph deployment logs <deployment-id> --build <build-id>.

Usage​

csph deployments builds create <deployment-id> [flags]

Aliases​

deployments builds create, deployments builds new, deployments builds trigger, deployments build create, deployments build new, deployments build trigger, deployment builds create, deployment builds new, deployment builds trigger, deployment build create, deployment build new, deployment build trigger, deploys builds create, deploys builds new, deploys builds trigger, deploys build create, deploys build new, deploys build trigger

Options​

Command Specific​

--account <string>
account ID
--force
build even when no changed file matches the manifest's watch_paths
--wait
wait for the build to succeed, fail or be canceled; progress goes to stderr

--wait-timeout <duration> (default "30m0s")

how long --wait waits before giving up (exit code 8: still pending)

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​

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​

# start a build
> csph deployment builds create <deployment-id>

# start a build and wait for it to finish
> csph deployment builds create <deployment-id> --wait

# build even if no changed file matches watch_paths
> csph deployment builds create <deployment-id> --force

# in CI: wait up to 15 minutes, then print the final build as JSON
> csph deployment builds create <deployment-id> --wait --wait-timeout 15m --output json

# pick the deployment interactively
> csph deployment builds create

See also​