Submit container image build
POST/v5/builds
Create a container image build record.
This multipart request accepts exactly one image source. Provide context_archive
to stream a tar.gz build context to the configured cloud build provider, or provide
image_url to register an existing tagged image as an immediately successful build
without invoking the provider. build_args and platform apply only to archive
builds.
Exactly one of agent_name or agent_id must identify the target agent.
agent_name creates a new build-only agent and must be unused. agent_id targets
an existing agent. Archive builds normally return in a queued or running state;
prebuilt images can immediately be passed to Cloud Deploy using the returned build
ID. Archives must be non-empty and no larger than 500 MB.
Submit container image build
curl https://api.egp.scale.com/v5/builds \
-H 'Content-Type: multipart/form-data' \
-H "x-api-key: $SGP_API_KEY" \
-F image_name=image_name{
"id": "id",
"account_id": "account_id",
"agent_name": "agent_name",
"build_status": "queued",
"cloud_provider_build_id": "cloud_provider_build_id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"image_name": "image_name",
"image_tag": "image_tag",
"source_commit": "source_commit",
"source_dirty": true,
"source_ref": "source_ref",
"source_repo": "source_repo",
"source_subpath": "source_subpath",
"working_tree_hash": "working_tree_hash",
"agent_id": "agent_id",
"build_end_time": "2019-12-27T18:11:19.117Z",
"build_start_time": "2019-12-27T18:11:19.117Z",
"image_url": "image_url",
"object": "agentex_cloud_build"
}Returns Examples
{
"id": "id",
"account_id": "account_id",
"agent_name": "agent_name",
"build_status": "queued",
"cloud_provider_build_id": "cloud_provider_build_id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"image_name": "image_name",
"image_tag": "image_tag",
"source_commit": "source_commit",
"source_dirty": true,
"source_ref": "source_ref",
"source_repo": "source_repo",
"source_subpath": "source_subpath",
"working_tree_hash": "working_tree_hash",
"agent_id": "agent_id",
"build_end_time": "2019-12-27T18:11:19.117Z",
"build_start_time": "2019-12-27T18:11:19.117Z",
"image_url": "image_url",
"object": "agentex_cloud_build"
}