Types overview

ApprovalConfig

ApprovalConfig describes configuration for manual approval of a build.
Fields
approvalRequired

boolean

Whether or not approval is needed. If this is set on a build, it will become pending when created, and will need to be explicitly approved to start.

ApprovalResult

ApprovalResult describes the decision and associated metadata of a manual approval of a build.
Fields
approvalTime

string (Timestamp format)

Output only. The time when the approval decision was made.

approverAccount

string

Output only. Email of the user that called the ApproveBuild API to approve or reject a build at the time that the API was called.

comment

string

Optional. An optional comment for this manual approval result.

decision

enum

Required. The decision of this manual approval.

Enum type. Can be one of the following:
DECISION_UNSPECIFIED Default enum type. This should not be used.
APPROVED Build is approved.
REJECTED Build is rejected.
url

string

Optional. An optional URL tied to this manual approval result. This field is essentially the same as comment, except that it will be rendered by the UI differently. An example use case is a link to an external job that approved this Build.

ApproveBuildRequest

Request to approve or reject a pending build.
Fields
approvalResult

object (ApprovalResult)

Approval decision and metadata.

ArtifactObjects

Files in the workspace to upload to Cloud Storage upon successful completion of all build steps.
Fields
location

string

Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". (see Bucket Name Requirements). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.

paths[]

string

Path globs used to match files in the build's workspace.

timing

object (TimeSpan)

Output only. Stores timing information for pushing all artifact objects.

ArtifactResult

An artifact that was uploaded during a build. This is a single record in the artifact manifest JSON file.
Fields
fileHash[]

object (FileHashes)

The file hash of the artifact.

location

string

The path of an artifact in a Google Cloud Storage bucket, with the generation number. For example, gs://mybucket/path/to/output.jar#generation.

Artifacts

Artifacts produced by a build that should be uploaded upon successful completion of all build steps.
Fields
images[]

string

A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.

objects

object (ArtifactObjects)

A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE.

Build

A build resource in the Cloud Build API. At a high level, a Build describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
Fields
approval

object (BuildApproval)

Output only. Describes this build's approval configuration, status, and result.

artifacts

object (Artifacts)

Artifacts produced by the build that should be uploaded upon successful completion of all build steps.

availableSecrets

object (Secrets)

Secrets and secret environment variables.

buildTriggerId

string

Output only. The ID of the BuildTrigger that triggered this build, if it was triggered automatically.

createTime

string (Timestamp format)

Output only. Time at which the request to create the build was received.

failureInfo

object (FailureInfo)

Output only. Contains information about the build when status=FAILURE.

finishTime

string (Timestamp format)

Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.

id

string

Output only. Unique identifier of the build.

images[]

string

A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.

logUrl

string

Output only. URL to logs for this build in Google Cloud Console.

logsBucket

string

Google Cloud Storage bucket where logs should be written (see Bucket Name Requirements). Logs file names will be of the format ${logs_bucket}/log-${build_id}.txt.

name

string

Output only. The 'Build' name with format: projects/{project}/locations/{location}/builds/{build}, where {build} is a unique identifier generated by the service.

options

object (BuildOptions)

Special options for this build.

projectId

string

Output only. ID of the project.

queueTtl

string (Duration format)

TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from create_time.

results

object (Results)

Output only. Results of the build.

secrets[]

object (Secret)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

serviceAccount

string

IAM service account whose credentials will be used at build runtime. Must be of the format projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. ACCOUNT can be email address or uniqueId of the service account.

source

object (Source)

The location of the source files to build.

sourceProvenance

object (SourceProvenance)

Output only. A permanent fixed identifier for source.

startTime

string (Timestamp format)

Output only. Time at which execution of the build was started.

status

enum

Output only. Status of the build.

Enum type. Can be one of the following:
STATUS_UNKNOWN Status of the build is unknown.
PENDING Build has been created and is pending execution and queuing. It has not been queued.
QUEUED Build or step is queued; work has not yet begun.
WORKING Build or step is being executed.
SUCCESS Build or step finished successfully.
FAILURE Build or step failed to complete successfully.
INTERNAL_ERROR Build or step failed due to an internal cause.
TIMEOUT Build or step took longer than was allowed.
CANCELLED Build or step was canceled by a user.
EXPIRED Build was enqueued for longer than the value of queue_ttl.
statusDetail

string

Output only. Customer-readable message about the current status.

steps[]

object (BuildStep)

Required. The operations to be performed on the workspace.

substitutions

map (key: string, value: string)

Substitutions data for Build resource.

tags[]

string

Tags for annotation of a Build. These are not docker tags.

timeout

string (Duration format)

Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. timeout starts ticking from startTime. Default time is ten minutes.

timing

map (key: string, value: object (TimeSpan))

Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps. * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. * SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.

warnings[]

object (Warning)

Output only. Non-fatal problems encountered during the execution of the build.

BuildApproval

BuildApproval describes a build's approval configuration, state, and result.
Fields
config

object (ApprovalConfig)

Output only. Configuration for manual approval of this build.

result

object (ApprovalResult)

Output only. Result of manual approval for this Build.

state

enum

Output only. The state of this build's approval.

Enum type. Can be one of the following:
STATE_UNSPECIFIED Default enum type. This should not be used.
PENDING Build approval is pending.
APPROVED Build approval has been approved.
REJECTED Build approval has been rejected.
CANCELLED Build was cancelled while it was still pending approval.

BuildOperationMetadata

Metadata for build operations.
Fields
build

object (Build)

The build that the operation is tracking.

BuildOptions

Optional arguments to enable specific features of builds.
Fields
diskSizeGb

string (int64 format)

Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.

dynamicSubstitutions

boolean

Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.

env[]

string

A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

logStreamingOption

enum

Option to define build log streaming behavior to Google Cloud Storage.

Enum type. Can be one of the following:
STREAM_DEFAULT Service may automatically determine build log streaming behavior.
STREAM_ON Build logs should be streamed to Google Cloud Storage.
STREAM_OFF Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed.
logging

enum

Option to specify the logging mode, which determines if and where build logs are stored.

Enum type. Can be one of the following:
LOGGING_UNSPECIFIED The service determines the logging mode. The default is LEGACY. Do not rely on the default logging behavior as it may change in the future.
LEGACY Cloud Logging and Cloud Storage logging are enabled.
GCS_ONLY Only Cloud Storage logging is enabled.
STACKDRIVER_ONLY This option is the same as CLOUD_LOGGING_ONLY.
CLOUD_LOGGING_ONLY Only Cloud Logging is enabled. Note that logs for both the Cloud Console UI and Cloud SDK are based on Cloud Storage logs, so neither will provide logs if this option is chosen.
NONE Turn off all logging. No build logs will be captured.
machineType

enum

Compute Engine machine type on which to run the build.

Enum type. Can be one of the following:
UNSPECIFIED Standard machine type.
N1_HIGHCPU_8 Highcpu machine with 8 CPUs.
N1_HIGHCPU_32 Highcpu machine with 32 CPUs.
E2_HIGHCPU_8 Highcpu e2 machine with 8 CPUs.
E2_HIGHCPU_32 Highcpu e2 machine with 32 CPUs.
pool

object (PoolOption)

Optional. Specification for execution on a WorkerPool. See running builds in a private pool for more information.

requestedVerifyOption

enum

Requested verifiability options.

Enum type. Can be one of the following:
NOT_VERIFIED Not a verifiable build. (default)
VERIFIED Verified build.
secretEnv[]

string

A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.

sourceProvenanceHash[]

string

Requested hash for SourceProvenance.

substitutionOption

enum

Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.

Enum type. Can be one of the following:
MUST_MATCH Fails the build if error in substitutions checks, like missing a substitution in the template or in the map.
ALLOW_LOOSE Do not fail the build if error in substitutions checks.
volumes[]

object (Volume)

Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

workerPool

string

This field deprecated; please use pool.name instead.

BuildStep

A step in the build pipeline.
Fields
args[]

string

A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.

dir

string

Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a volume for that path is specified. If the build specifies a RepoSource with dir and a step with a dir, which specifies an absolute path, the RepoSource dir is ignored for the step's execution.

entrypoint

string

Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used.

env[]

string

A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

id

string

Unique identifier for this build step, used in wait_for to reference this build step as a dependency.

name

string

Required. The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step.

pullTiming

object (TimeSpan)

Output only. Stores timing information for pulling this build step's builder image only.

script

string

A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args.

secretEnv[]

string

A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret.

status

enum

Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.

Enum type. Can be one of the following:
STATUS_UNKNOWN Status of the build is unknown.
PENDING Build has been created and is pending execution and queuing. It has not been queued.
QUEUED Build or step is queued; work has not yet begun.
WORKING Build or step is being executed.
SUCCESS Build or step finished successfully.
FAILURE Build or step failed to complete successfully.
INTERNAL_ERROR Build or step failed due to an internal cause.
TIMEOUT Build or step took longer than was allowed.
CANCELLED Build or step was canceled by a user.
EXPIRED Build was enqueued for longer than the value of queue_ttl.
timeout

string (Duration format)

Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.

timing

object (TimeSpan)

Output only. Stores timing information for executing this build step.

volumes[]

object (Volume)

List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.

waitFor[]

string

The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in wait_for have completed successfully. If wait_for is empty, this build step will start when all previous build steps in the Build.Steps list have completed successfully.

BuildTrigger

Configuration for an automated build in response to source repository changes.
Fields
approvalConfig

object (ApprovalConfig)

Configuration for manual approval to start a build invocation of this BuildTrigger.

autodetect

boolean

Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers.

build

object (Build)

Contents of the build template.

createTime

string (Timestamp format)

Output only. Time when the trigger was created.

description

string

Human-readable description of this trigger.

disabled

boolean

If true, the trigger will never automatically execute a build.

filename

string

Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

filter

string

A Common Expression Language string.

gitFileSource

object (GitFileSource)

The file source describing the local or remote Build template.

github

object (GitHubEventsConfig)

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with trigger_template.

id

string

Output only. Unique identifier of the trigger.

ignoredFiles[]

string

ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**". If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.

includedFiles[]

string

If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.

name

string

User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character.

pubsubConfig

object (PubsubConfig)

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

resourceName

string

The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.

serviceAccount

string

The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}

sourceToBuild

object (GitRepoSource)

The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.

substitutions

map (key: string, value: string)

Substitutions for Build resource. The keys must match the following regular expression: ^_[A-Z0-9_]+$.

tags[]

string

Tags for annotation of a BuildTrigger

triggerTemplate

object (RepoSource)

Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. Mutually exclusive with github.

webhookConfig

object (WebhookConfig)

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.

BuiltImage

An image built by the pipeline.
Fields
digest

string

Docker Registry 2.0 digest.

name

string

Name used to push the container image to Google Container Registry, as presented to docker push.

pushTiming

object (TimeSpan)

Output only. Stores timing information for pushing the specified image.

CancelBuildRequest

Request to cancel an ongoing build.
Fields
id

string

Required. ID of the build.

name

string

The name of the Build to cancel. Format: projects/{project}/locations/{location}/builds/{build}

projectId

string

Required. ID of the project.

CreateGitHubEnterpriseConfigOperationMetadata

Metadata for CreateGithubEnterpriseConfig operation.
Fields
completeTime

string (Timestamp format)

Time the operation was completed.

createTime

string (Timestamp format)

Time the operation was created.

githubEnterpriseConfig

string

The resource name of the GitHubEnterprise to be created. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}.

CreateWorkerPoolOperationMetadata

Metadata for the CreateWorkerPool operation.
Fields
completeTime

string (Timestamp format)

Time the operation was completed.

createTime

string (Timestamp format)

Time the operation was created.

workerPool

string

The resource name of the WorkerPool to create. Format: projects/{project}/locations/{location}/workerPools/{worker_pool}.

DeleteGitHubEnterpriseConfigOperationMetadata

Metadata for DeleteGitHubEnterpriseConfig operation.
Fields
completeTime

string (Timestamp format)

Time the operation was completed.

createTime

string (Timestamp format)

Time the operation was created.

githubEnterpriseConfig

string

The resource name of the GitHubEnterprise to be deleted. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}.

DeleteWorkerPoolOperationMetadata

Metadata for the DeleteWorkerPool operation.
Fields
completeTime

string (Timestamp format)

Time the operation was completed.

createTime

string (Timestamp format)

Time the operation was created.

workerPool

string

The resource name of the WorkerPool being deleted. Format: projects/{project}/locations/{location}/workerPools/{worker_pool}.

FailureInfo

A fatal problem encountered during the execution of the build.
Fields
detail

string

Explains the failure issue in more detail using hard-coded text.

type

enum

The name of the failure.

Enum type. Can be one of the following:
FAILURE_TYPE_UNSPECIFIED Type unspecified
PUSH_FAILED Unable to push the image to the repository.
PUSH_IMAGE_NOT_FOUND Final image not found.
PUSH_NOT_AUTHORIZED Unauthorized push of the final image.
LOGGING_FAILURE Backend logging failures. Should retry.
USER_BUILD_STEP A build step has failed.
FETCH_SOURCE_FAILED The source fetching has failed.

FileHashes

Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
Fields
fileHash[]

object (Hash)

Collection of file hashes.

GitFileSource

GitFileSource describes a file within a (possibly remote) code repository.
Fields
path

string

The path of the file, with the repo root as the root of the path.

repoType

enum

See RepoType above.

Enum type. Can be one of the following:
UNKNOWN The default, unknown repo type.
CLOUD_SOURCE_REPOSITORIES A Google Cloud Source Repositories-hosted repo.
GITHUB A GitHub-hosted repo not necessarily on "github.com" (i.e. GitHub Enterprise).
revision

string

The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.

uri

string

The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.

GitHubEnterpriseConfig

GitHubEnterpriseConfig represents a configuration for a GitHub Enterprise server.
Fields
appId

string (int64 format)

Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise server.

createTime

string (Timestamp format)

Output only. Time when the installation was associated with the project.

displayName

string

Name to display for this config.

hostUrl

string

The URL of the github enterprise host the configuration is for.

name

string

Optional. The full resource name for the GitHubEnterpriseConfig For example: "projects/{$project_id}/githubEnterpriseConfigs/{$config_id}"

peeredNetwork

string

Optional. The network to be used when reaching out to the GitHub Enterprise server. The VPC network must be enabled for private service connection. This should be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the GitHub Enterprise server will be made over the public internet. Must be in the format projects/{project}/global/networks/{network}, where {project} is a project number or id and {network} is the name of a VPC network in the project.

secrets

object (GitHubEnterpriseSecrets)

Names of secrets in Secret Manager.

sslCa

string

Optional. SSL certificate to use for requests to GitHub Enterprise.

webhookKey

string

The key that should be attached to webhook calls to the ReceiveWebhook endpoint.

GitHubEnterpriseSecrets

GitHubEnterpriseSecrets represents the names of all necessary secrets in Secret Manager for a GitHub Enterprise server. Format is: projects//secrets/.
Fields
oauthClientIdName

string

The resource name for the OAuth client ID secret in Secret Manager.

oauthClientIdVersionName

string

The resource name for the OAuth client ID secret version in Secret Manager.

oauthSecretName

string

The resource name for the OAuth secret in Secret Manager.

oauthSecretVersionName

string

The resource name for the OAuth secret secret version in Secret Manager.

privateKeyName

string

The resource name for the private key secret.

privateKeyVersionName

string

The resource name for the private key secret version.

webhookSecretName

string

The resource name for the webhook secret in Secret Manager.

webhookSecretVersionName

string

The resource name for the webhook secret secret version in Secret Manager.

GitHubEventsConfig

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.
Fields
enterpriseConfigResourceName

string

Optional. The resource name of the github enterprise config that should be applied to this installation. For example: "projects/{$project_id}/githubEnterpriseConfigs/{$config_id}"

installationId

string (int64 format)

The installationID that emits the GitHub event.

name

string

Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is "cloud-builders".

owner

string

Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform".

pullRequest

object (PullRequestFilter)

filter to match changes in pull requests.

push

object (PushFilter)

filter to match changes in refs like branches, tags.

GitRepoSource

GitRepoSource describes a repo and ref of a code repository.
Fields
ref

string

The branch or tag to use. Must start with "refs/" (required).

repoType

enum

See RepoType below.

Enum type. Can be one of the following:
UNKNOWN The default, unknown repo type.
CLOUD_SOURCE_REPOSITORIES A Google Cloud Source Repositories-hosted repo.
GITHUB A GitHub-hosted repo not necessarily on "github.com" (i.e. GitHub Enterprise).
uri

string

The URI of the repo (required).

GoogleDevtoolsCloudbuildV2OperationMetadata

Represents the metadata of the long-running operation.
Fields
apiVersion

string

Output only. API version used to start the operation.

createTime

string (Timestamp format)

Output only. The time the operation was created.

endTime

string (Timestamp format)

Output only. The time the operation finished running.

requestedCancellation

boolean

Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

statusMessage

string

Output only. Human-readable status of the operation, if any.

target

string

Output only. Server-defined resource path for the target of the operation.

verb

string

Output only. Name of the verb executed by the operation.

HTTPDelivery

HTTPDelivery is the delivery configuration for an HTTP notification.
Fields
uri

string

The URI to which JSON-containing HTTP POST requests should be sent.

Hash

Container message for hash values.
Fields
type

enum

The type of hash that was performed.

Enum type. Can be one of the following:
NONE No hash requested.
SHA256 Use a sha256 hash.
MD5 Use a md5 hash.
value

string (bytes format)

The hash value.

HttpBody

Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
Fields
contentType

string

The HTTP Content-Type header value specifying the content type of the body.

data

string (bytes format)

The HTTP request/response body as raw binary.

extensions[]

object

Application specific response metadata. Must be set in the first response for streaming APIs.

InlineSecret

Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.
Fields
envMap

map (key: string, value: string (bytes format))

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

kmsKeyName

string

Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects//locations//keyRings//cryptoKeys/

ListBuildTriggersResponse

Response containing existing BuildTriggers.
Fields
nextPageToken

string

Token to receive the next page of results.

triggers[]

object (BuildTrigger)

BuildTriggers for the project, sorted by create_time descending.

ListBuildsResponse

Response including listed builds.
Fields
builds[]

object (Build)

Builds will be sorted by create_time, descending.

nextPageToken

string

Token to receive the next page of results. This will be absent if the end of the response list has been reached.

ListGithubEnterpriseConfigsResponse

RPC response object returned by ListGithubEnterpriseConfigs RPC method.
Fields
configs[]

object (GitHubEnterpriseConfig)

A list of GitHubEnterpriseConfigs

ListWorkerPoolsResponse

Response containing existing WorkerPools.
Fields
nextPageToken

string

Continuation token used to page through large result sets. Provide this value in a subsequent ListWorkerPoolsRequest to return the next page of results.

workerPools[]

object (WorkerPool)

WorkerPools for the specified project.

NetworkConfig

Defines the network configuration for the pool.
Fields
egressOption

enum

Option to configure network egress for the workers.

Enum type. Can be one of the following:
EGRESS_OPTION_UNSPECIFIED If set, defaults to PUBLIC_EGRESS.
NO_PUBLIC_EGRESS If set, workers are created without any public address, which prevents network egress to public IPs unless a network proxy is configured.
PUBLIC_EGRESS If set, workers are created with a public address which allows for public internet egress.
peeredNetwork

string

Required. Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to WorkerPool.project_id on the service producer network. Must be in the format projects/{project}/global/networks/{network}, where {project} is a project number, such as 12345, and {network} is the name of a VPC network in the project. See Understanding network configuration options

Notification

Notification is the container which holds the data that is relevant to this particular notification.
Fields
filter

string

The filter string to use for notification filtering. Currently, this is assumed to be a CEL program. See https://opensource.google/projects/cel for more.

httpDelivery

object (HTTPDelivery)

Configuration for HTTP delivery.

slackDelivery

object (SlackDelivery)

Configuration for Slack delivery.

smtpDelivery

object (SMTPDelivery)

Configuration for SMTP (email) delivery.

structDelivery

map (key: string, value: any)

Escape hatch for users to supply custom delivery configs.

NotifierConfig

NotifierConfig is the top-level configuration message.
Fields
apiVersion

string

The API version of this configuration format.

kind

string

The type of notifier to use (e.g. SMTPNotifier).

metadata

object (NotifierMetadata)

Metadata for referring to/handling/deploying this notifier.

spec

object (NotifierSpec)

The actual configuration for this notifier.

NotifierMetadata

NotifierMetadata contains the data which can be used to reference or describe this notifier.
Fields
name

string

The human-readable and user-given name for the notifier. For example: "repo-merge-email-notifier".

notifier

string

The string representing the name and version of notifier to deploy. Expected to be of the form of "/:". For example: "gcr.io/my-project/notifiers/smtp:1.2.34".

NotifierSecret

NotifierSecret is the container that maps a secret name (reference) to its Google Cloud Secret Manager resource path.
Fields
name

string

Name is the local name of the secret, such as the verbatim string "my-smtp-password".

value

string

Value is interpreted to be a resource path for fetching the actual (versioned) secret data for this secret. For example, this would be a Google Cloud Secret Manager secret version resource path like: "projects/my-project/secrets/my-secret/versions/latest".

NotifierSecretRef

NotifierSecretRef contains the reference to a secret stored in the corresponding NotifierSpec.
Fields
secretRef

string

The value of secret_ref should be a name that is registered in a Secret in the secrets list of the Spec.

NotifierSpec

NotifierSpec is the configuration container for notifications.
Fields
notification

object (Notification)

The configuration of this particular notifier.

secrets[]

object (NotifierSecret)

Configurations for secret resources used by this particular notifier.

Operation

This resource represents a long-running operation that is the result of a network API call.
Fields
done

boolean

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

error

object (Status)

The error result of the operation in case of failure or cancellation.

metadata

map (key: string, value: any)

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

name

string

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

response

map (key: string, value: any)

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

OperationMetadata

Represents the metadata of the long-running operation.
Fields
apiVersion

string

Output only. API version used to start the operation.

cancelRequested

boolean

Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

createTime

string (Timestamp format)

Output only. The time the operation was created.

endTime

string (Timestamp format)

Output only. The time the operation finished running.

statusDetail

string

Output only. Human-readable status of the operation, if any.

target

string

Output only. Server-defined resource path for the target of the operation.

verb

string

Output only. Name of the verb executed by the operation.

PoolOption

Details about how a build should be executed on a WorkerPool. See running builds in a private pool for more information.
Fields
name

string

The WorkerPool resource to execute the build on. You must have cloudbuild.workerpools.use on the project hosting the WorkerPool. Format projects/{project}/locations/{location}/workerPools/{workerPoolId}

PrivatePoolV1Config

Configuration for a V1 PrivatePool.
Fields
networkConfig

object (NetworkConfig)

Network configuration for the pool.

workerConfig

object (WorkerConfig)

Machine configuration for the workers in the pool.

ProcessAppManifestCallbackOperationMetadata

Metadata for ProcessAppManifestCallback operation.
Fields
completeTime

string (Timestamp format)

Time the operation was completed.

createTime

string (Timestamp format)

Time the operation was created.

githubEnterpriseConfig

string

The resource name of the GitHubEnterprise to be created. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}.

PubsubConfig

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.
Fields
serviceAccountEmail

string

Service account that will make the push request.

state

enum

Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.

Enum type. Can be one of the following:
STATE_UNSPECIFIED The subscription configuration has not been checked.
OK The Pub/Sub subscription is properly configured.
SUBSCRIPTION_DELETED The subscription has been deleted.
TOPIC_DELETED The topic has been deleted.
SUBSCRIPTION_MISCONFIGURED Some of the subscription's field are misconfigured.
subscription

string

Output only. Name of the subscription. Format is projects/{project}/subscriptions/{subscription}.

topic

string

The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}.

PullRequestFilter

PullRequestFilter contains filter properties for matching GitHub Pull Requests.
Fields
branch

string

Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax

commentControl

enum

Configure builds to run whether a repository owner or collaborator need to comment /gcbrun.

Enum type. Can be one of the following:
COMMENTS_DISABLED Do not require comments on Pull Requests before builds are triggered.
COMMENTS_ENABLED Enforce that repository owners or collaborators must comment on Pull Requests before builds are triggered.
COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY Enforce that repository owners or collaborators must comment on external contributors' Pull Requests before builds are triggered.
invertRegex

boolean

If true, branches that do NOT match the git_ref will trigger a build.

PushFilter

Push contains filter properties for matching GitHub git pushes.
Fields
branch

string

Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax

invertRegex

boolean

When true, only trigger a build if the revision regex does NOT match the git_ref regex.

tag

string

Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax

RepoSource

Location of the source in a Google Cloud Source Repository.
Fields
branchName

string

Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax

commitSha

string

Explicit commit SHA to build.

dir

string

Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.

invertRegex

boolean

Only trigger a build if the revision regex does NOT match the revision regex.

projectId

string

ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.

repoName

string

Name of the Cloud Source Repository.

substitutions

map (key: string, value: string)

Substitutions to use in a triggered build. Should only be used with RunBuildTrigger

tagName

string

Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax

Results

Artifacts created by the build pipeline.
Fields
artifactManifest

string

Path to the artifact manifest. Only populated when artifacts are uploaded.

artifactTiming

object (TimeSpan)

Time to push all non-container artifacts.

buildStepImages[]

string

List of build step digests, in the order corresponding to build step indices.

buildStepOutputs[]

string (bytes format)

List of build step outputs, produced by builder images, in the order corresponding to build step indices. Cloud Builders can produce this output by writing to $BUILDER_OUTPUT/output. Only the first 4KB of data is stored.

images[]

object (BuiltImage)

Container images that were built as a part of the build.

numArtifacts

string (int64 format)

Number of artifacts uploaded. Only populated when artifacts are uploaded.

RetryBuildRequest

Specifies a build to retry.
Fields
id

string

Required. Build ID of the original build.

name

string

The name of the Build to retry. Format: projects/{project}/locations/{location}/builds/{build}

projectId

string

Required. ID of the project.

RunBuildTriggerRequest

Specifies a build trigger to run and the source to use.
Fields
projectId

string

Required. ID of the project.

source

object (RepoSource)

Source to build against this trigger.

triggerId

string

Required. ID of the trigger.

SMTPDelivery

SMTPDelivery is the delivery configuration for an SMTP (email) notification.
Fields
fromAddress

string

This is the SMTP account/email that appears in the From: of the email. If empty, it is assumed to be sender.

password

object (NotifierSecretRef)

The SMTP sender's password.

port

string

The SMTP port of the server.

recipientAddresses[]

string

This is the list of addresses to which we send the email (i.e. in the To: of the email).

senderAddress

string

This is the SMTP account/email that is used to send the message.

server

string

The address of the SMTP server.

Secret

Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use kmsKeyName with available_secrets instead of using kmsKeyName with secret. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
Fields
kmsKeyName

string

Cloud KMS key name to use to decrypt these envs.

secretEnv

map (key: string, value: string (bytes format))

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

SecretManagerSecret

Pairs a secret environment variable with a SecretVersion in Secret Manager.
Fields
env

string

Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.

versionName

string

Resource name of the SecretVersion. In format: projects//secrets//versions/*

Secrets

Secrets and secret environment variables.
Fields
inline[]

object (InlineSecret)

Secrets encrypted with KMS key and the associated secret environment variable.

secretManager[]

object (SecretManagerSecret)

Secrets in Secret Manager and associated secret environment variable.

SlackDelivery

SlackDelivery is the delivery configuration for delivering Slack messages via webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/webhooks.
Fields
webhookUri

object (NotifierSecretRef)

The secret reference for the Slack webhook URI for sending messages to a channel.

Source

Location of the source in a supported storage service.
Fields
repoSource

object (RepoSource)

If provided, get the source from this location in a Cloud Source Repository.

storageSource

object (StorageSource)

If provided, get the source from this location in Google Cloud Storage.

storageSourceManifest

object (StorageSourceManifest)

If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview; see description here.

SourceProvenance

Provenance of the source. Ways to find the original source, or verify that some source was used for this build.
Fields
fileHashes

map (key: string, value: object (FileHashes))

Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that FileHashes will only be populated if BuildOptions has requested a SourceProvenanceHash. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (.tar.gz), the FileHash will be for the single path to that file.

resolvedRepoSource

object (RepoSource)

A copy of the build's source.repo_source, if exists, with any revisions resolved.

resolvedStorageSource

object (StorageSource)

A copy of the build's source.storage_source, if exists, with any generations resolved.

resolvedStorageSourceManifest

object (StorageSourceManifest)

A copy of the build's source.storage_source_manifest, if exists, with any revisions resolved. This feature is in Preview.

Status

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
Fields
code

integer (int32 format)

The status code, which should be an enum value of google.rpc.Code.

details[]

object

A list of messages that carry the error details. There is a common set of message types for APIs to use.

message

string

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

StorageSource

Location of the source in an archive file in Google Cloud Storage.
Fields
bucket

string

Google Cloud Storage bucket containing the source (see Bucket Name Requirements).

generation

string (int64 format)

Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.

object

string

Google Cloud Storage object containing the source. This object must be a zipped (.zip) or gzipped archive file (.tar.gz) containing source to build.

StorageSourceManifest

Location of the source manifest in Google Cloud Storage. This feature is in Preview; see description here.
Fields
bucket

string

Google Cloud Storage bucket containing the source manifest (see Bucket Name Requirements).

generation

string (int64 format)

Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.

object

string

Google Cloud Storage object containing the source manifest. This object must be a JSON file.

TimeSpan

Start and end times for a build execution phase.
Fields
endTime

string (Timestamp format)

End of time span.

startTime

string (Timestamp format)

Start of time span.

UpdateGitHubEnterpriseConfigOperationMetadata

Metadata for UpdateGitHubEnterpriseConfig operation.
Fields
completeTime

string (Timestamp format)

Time the operation was completed.

createTime

string (Timestamp format)

Time the operation was created.

githubEnterpriseConfig

string

The resource name of the GitHubEnterprise to be updated. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}.

UpdateWorkerPoolOperationMetadata

Metadata for the UpdateWorkerPool operation.
Fields
completeTime

string (Timestamp format)

Time the operation was completed.

createTime

string (Timestamp format)

Time the operation was created.

workerPool

string

The resource name of the WorkerPool being updated. Format: projects/{project}/locations/{location}/workerPools/{worker_pool}.

Volume

Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
Fields
name

string

Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.

path

string

Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.

Warning

A non-fatal problem encountered during the execution of the build.
Fields
priority

enum

The priority for this warning.

Enum type. Can be one of the following:
PRIORITY_UNSPECIFIED Should not be used.
INFO e.g. deprecation warnings and alternative feature highlights.
WARNING e.g. automated detection of possible issues with the build.
ALERT e.g. alerts that a feature used in the build is pending removal
text

string

Explanation of the warning generated.

WebhookConfig

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.
Fields
secret

string

Required. Resource name for the secret required as a URL parameter.

state

enum

Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.

Enum type. Can be one of the following:
STATE_UNSPECIFIED The webhook auth configuration not been checked.
OK The auth configuration is properly setup.
SECRET_DELETED The secret provided in auth_method has been deleted.

WorkerConfig

Defines the configuration to be used for creating workers in the pool.
Fields
diskSizeGb

string (int64 format)

Size of the disk attached to the worker, in GB. See Worker pool config file. Specify a value of up to 1000. If 0 is specified, Cloud Build will use a standard disk size.

machineType

string

Machine type of a worker, such as e2-medium. See Worker pool config file. If left blank, Cloud Build will use a sensible default.

WorkerPool

Configuration for a WorkerPool. Cloud Build owns and maintains a pool of workers for general use and have no access to a project's private network. By default, builds submitted to Cloud Build will use a worker from this pool. If your build needs access to resources on a private network, create and use a WorkerPool to run your builds. Private WorkerPools give your builds access to any single VPC network that you administer, including any on-prem resources connected to that VPC network. For an overview of private pools, see Private pools overview.
Fields
annotations

map (key: string, value: string)

User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

createTime

string (Timestamp format)

Output only. Time at which the request to create the WorkerPool was received.

deleteTime

string (Timestamp format)

Output only. Time at which the request to delete the WorkerPool was received.

displayName

string

A user-specified, human-readable name for the WorkerPool. If provided, this value must be 1-63 characters.

etag

string

Output only. Checksum computed by the server. May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding.

name

string

Output only. The resource name of the WorkerPool, with format projects/{project}/locations/{location}/workerPools/{worker_pool}. The value of {worker_pool} is provided by worker_pool_id in CreateWorkerPool request and the value of {location} is determined by the endpoint accessed.

privatePoolV1Config

object (PrivatePoolV1Config)

Private Pool using a v1 configuration.

state

enum

Output only. WorkerPool state.

Enum type. Can be one of the following:
STATE_UNSPECIFIED State of the WorkerPool is unknown.
CREATING WorkerPool is being created.
RUNNING WorkerPool is running.
DELETING WorkerPool is being deleted: cancelling builds and draining workers.
DELETED WorkerPool is deleted.
uid

string

Output only. A unique identifier for the WorkerPool.

updateTime

string (Timestamp format)

Output only. Time at which the request to update the WorkerPool was received.