Platform

Deploy an existing App from CI

Link a clean checkout, deploy it, and capture the deployment receipt.

View as Markdown

Commit the App source and cluster.toml. Keep .ccp/ ignored so each runner selects its target explicitly. Set CCP_SESSION_TOKEN through your runner's secret store and set ORG_ID and APP_ID to the existing target IDs.

set -eu
export CCP_HEADLESS=1
ccp link --org-id "$ORG_ID" --app "$APP_ID"
receipt=$(ccp --json deploy --prod)
printf '%s\n' "$receipt" | jq -er --arg app "$APP_ID" \
  'select(.app_id == $app and .production == true) | .url'

Omit --prod for a preview and check for .production == false. The receipt contains the App, organization and deployment IDs, the URL, and the production flag. Diagnostic output goes to stderr. The shell stops if linking or deployment fails.

Exit codeMeaning
0Success
1Local or unclassified failure
2Invalid command or argument
3Authentication or authorization failure
4Resource missing
5Conflict or failed precondition
6Service, deadline or capacity failure

Review the error before retrying a mutation. A deadline can expire after the server accepts a request. Supply --yes on destructive commands only when the job is intended to perform the deletion. To run a repository build inside a Cluster Sandbox, see CI builds.

On this page

No Headings