Build an Image from a Git Repository
build_imageBuild a container image on Control Plane from a GitHub or GitLab repository and push it to the org's private registry. No Docker daemon is involved: the service clones the repo, detects how to build it (Dockerfile when present), and always produces linux/amd64. Returns a buildId to read with get_image_build — the build keeps running after this call returns. ONLY repositories work here. To build a LOCAL FOLDER, tell the user to run cpln image build --remote --dir PATH --name NAME:TAG in their terminal — this server has no access to their filesystem. Building an existing NAME:TAG replaces that image. A private repository needs a one-time browser authorization per org; this tool returns the link when that is missing. Recommended reading before first use: get_cpln_skill("image") — the runbook for this tool family (read once per session).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | Organization slug (lowercase kebab-case). NEVER guess — if the user has not named one, ask. On org-not-found, stop and ask; do not retry variants. | |
| tag | Yes | Tag for this build, e.g. "v1.2.0". Required — there is no default. Building an EXISTING tag REPLACES it, and any workload on that tag with dynamic-tag support redeploys onto the new image. Prefer a fresh tag. | |
| name | Yes | Image name WITHOUT the tag, e.g. "my-app". The result is referenced in a workload as //image/NAME:TAG. | |
| branch | No | Branch to build. Omit for the repository's default branch. | |
| noCache | No | Rebuild every step, ignoring cached layers. Slower — only when a cached layer is suspect. | |
| repoUrl | Yes | HTTPS URL of the repository to build, e.g. "https://github.com/acme/api". GitHub and GitLab only. SSH remotes and URLs with embedded credentials are rejected. A private repo needs a one-time browser authorization per org, which this tool returns a link for. | |
| connectNonce | No | Only when retrying after the user authorized the git provider: echo this tool's previous `connectNonce` verbatim. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The full machine-readable result — list rows, the resource object, query results. Read THIS, not just the summary. | |
| summary | Yes | One-line summary of the result. | |
| nextSteps | No | Recommended follow-up actions for this task, in order. |