gcp.cloudbuild.image.build ​
Start a Google Cloud Build job that builds a container image and pushes it to Artifact Registry.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | Base-gcp |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | GCP CloudConnection UUID. |
project_id | string | No | — | GCP project override; defaults to the connection project. |
location | string | Yes | — | Cloud Build region, e.g. us-central1. |
source_type | string | Yes | — | Source kind, one of github_repo, git_repo, storage_archive. |
source | json | Yes | — | Provider Cloud Build source payload, sanitized before logging. |
image_uri | string | Yes | — | Destination Artifact Registry image URI including tag. |
dockerfile | string | No | — | Dockerfile path relative to source root. |
build_context | string | No | — | Build context directory relative to source root. |
substitutions | json | No | — | Cloud Build substitution variables. |
service_account | string | No | — | Cloud Build service account email or resource name. |
timeout_seconds | integer | No | — | Build timeout in seconds. |
logs_bucket | string | No | — | Optional logs bucket. |
tags | json | No | — | Provider build tags. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | Echoed connection UUID. |
project_id | string | No | — | Effective project. |
location | string | No | — | Build region. |
source_type | string | No | — | Source kind, one of github_repo, git_repo, storage_archive. |
source | json | No | — | Provider Cloud Build source payload, sanitized before logging. |
dockerfile | string | No | — | Dockerfile path relative to source root. |
build_context | string | No | — | Build context directory relative to source root. |
substitutions | json | No | — | Cloud Build substitution variables. |
service_account | string | No | — | Cloud Build service account email or resource name. |
timeout_seconds | integer | No | — | Build timeout in seconds. |
logs_bucket | string | No | — | Optional logs bucket. |
tags | json | No | — | Provider build tags. |
build_id | string | No | — | Cloud Build build id. |
build_name | string | No | — | Full provider build resource name. |
status | string | No | — | Initial build status. |
image_uri | string | No | — | Destination image URI. |
log_url | string | No | — | Cloud Build log URL. |
build | json | No | — | Sanitized provider build response. |
failure_reason | string | No | — | Human-readable failure reason. |
failed_step | string | No | — | Failed logical step. |
failed_layer | json | No | — | Engine failed layer. |
failed_at_state | string | No | — | State where failure occurred. |
error | string | No | — | Error message. |
error_type | string | No | — | Error class. |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | preflight | — |
preflighting | No | No | — | execute | — |
starting | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | preflight | preflighting | — |
preflighting | execute | starting | — |
starting | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "gcp.cloudbuild.image.build",
"initial_data": {
"connection_uuid": "value",
"location": "value",
"source_type": "value",
"source": "value"
}
}