Resource: Build
A single build for a backend, at a specific point codebase reference tag and point in time. Encapsulates several resources, including an Artifact Registry container image, a Cloud Build invocation that built the image, and the Cloud Run revision that uses that image.
JSON representation |
---|
{ "name": string, "displayName": string, "state": enum ( |
Fields | |
---|---|
name |
Identifier. The resource name of the build. Format:
|
displayName |
Optional. Human-readable name. 63 character limit. |
state |
Output only. The state of the build. |
error |
Output only. A status and (human readable) error message for the build, if in a |
environment |
Output only. The environment name of the backend when this build was created. |
config |
Optional. Additional configuration of the service. |
image |
Output only. The Artifact Registry container image URI, used by the Cloud Run |
source |
Required. Immutable. The source for the build. |
buildLogsUri |
Output only. The location of the Cloud Build logs for the build process. |
reconciling |
Output only. A field that, if true, indicates that the build has an ongoing LRO. |
createTime |
Output only. Time at which the build was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. Time at which the build was last updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
deleteTime |
Output only. Time at which the build was deleted. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
labels |
Optional. Unstructured key value map that can be used to organize and categorize objects. An object containing a list of |
annotations |
Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. An object containing a list of |
uid |
Output only. System-assigned, unique identifier. |
etag |
Output only. Server-computed checksum based on other values; may be sent on update or delete to ensure operation is done on expected resource. |
State
The state of the build.
Enums | |
---|---|
STATE_UNSPECIFIED |
The build is in an unknown state. |
BUILDING |
The build is building. |
BUILT |
The build has completed and is awaiting the next step. This may move to DEPLOYING once App Hosting starts to set up infrastructure. |
DEPLOYING |
The infrastructure for this build is being set up. |
READY |
The infrastructure for this build is ready. The build may or may not be serving traffic - see Backend.traffic for the current state, or Backend.traffic_statuses for the desired state. |
FAILED |
The build has failed. |
Config
Additional configuration of the backend for this build.
JSON representation |
---|
{
"runConfig": {
object ( |
Fields | |
---|---|
runConfig |
Optional. Additional configuration of the Cloud Run |
RunConfig
Additional configuration to apply to the Cloud Run service
.
JSON representation |
---|
{ "cpu": number, "memoryMib": integer, "concurrency": integer, "maxInstances": integer, "minInstances": integer } |
Fields | |
---|---|
cpu |
Optional. Number of CPUs used for each serving instance. By default, cpu defaults to the Cloud Run's default of 1.0. CPU can be set to value 1, 2, 4, 6, or 8 CPUs, and for less than 1 CPU, a value from 0.08 to less than 1.00, in increments of 0.01. If you set a value of less than 1 CPU, you must set concurrency to 1, and CPU will only be allocated during request processing. Increasing CPUs limit may require increase in memory limits:
|
memoryMib |
Optional. Amount of memory allocated for each serving instance in MiB. By default, memory defaults to the Cloud Run's default where each instance is allocated 512 MiB of memory. Memory can be set to any integer value between 128 to 32768. Increasing memory limit may require increase in CPUs limits:
|
concurrency |
Optional. Maximum number of requests that each Cloud Run instance can receive. By default, each instance can receive Cloud Run's default of up to 80 requests at the same time. Concurrency can be set to any integer value up to 1000. |
maxInstances |
Optional. Number of Cloud Run instances to maintain at maximum for each revision. By default, each Cloud Run |
minInstances |
Optional. Number of Cloud Run instances to maintain at minimum for each Cloud Run Service. By default, there are no minimum. Even if the service splits traffic across multiple revisions, the total number of instances for a service will be capped at this value. |
BuildSource
The source for the build.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field source . The input source for the build. Typically will reference a commit in a source repository. May also reference a container image. source can be only one of the following: |
|
codebase |
A codebase source. |
container |
An Artifact Registry container image source. |
CodebaseSource
A codebase source, representing the state of the codebase that the build will be created at.
JSON representation |
---|
{ "displayName": string, "hash": string, "commitMessage": string, "uri": string, "author": { object ( |
Fields | |
---|---|
displayName |
Output only. The human-friendly name to use for this Codebase when displaying a build. We use the first eight characters of the SHA-1 hash for GitHub.com. |
hash |
Output only. The full SHA-1 hash of a Git commit, if available. |
commitMessage |
Output only. The message of a codebase change. |
uri |
Output only. A URI linking to the codebase on an hosting provider's website. May not be valid if the commit has been rebased or force-pushed out of existence in the linked repository. |
author |
Output only. The author contained in the metadata of a version control change. |
commitTime |
Output only. The time the change was made. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
Union field
|
|
branch |
The branch in the codebase to build from, using the latest commit. |
commit |
The commit in the codebase to build from. |
UserMetadata
Version control metadata for a user associated with a resolved codebase. Currently assumes a Git user.
JSON representation |
---|
{ "displayName": string, "email": string, "imageUri": string } |
Fields | |
---|---|
displayName |
Output only. The 'name' field in a Git user's git.config. Required by Git. |
email |
Output only. The 'email' field in a Git user's git.config, if available. |
imageUri |
Output only. The URI of an image file associated with the user's account in an external source control provider, if available. |
ContainerSource
The URI of an Artifact Registry container image to use as the build source.
JSON representation |
---|
{ "image": string } |
Fields | |
---|---|
image |
Required. A URI representing a container for the backend to use. |
Methods |
|
---|---|
|
Creates a new build for a backend. |
|
Deletes a single build. |
|
Gets information about a build. |
|
Lists builds in a given project, location, and backend. |