Skip to main content

builds

Overview

Namebuilds
TypeResource
Idgoogle.cloudbuild.builds

Fields

NameDatatypeDescription
idstringOutput only. Unique identifier of the build.
namestringOutput only. The 'Build' name with format: projects/{project}/locations/{location}/builds/{build}, where {build} is a unique identifier generated by the service.
failureInfoobjectA fatal problem encountered during the execution of the build.
queueTtlstringTTL 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.
logUrlstringOutput only. URL to logs for this build in Google Cloud Console.
startTimestringOutput only. Time at which execution of the build was started.
availableSecretsobjectSecrets and secret environment variables.
timeoutstringAmount 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 60 minutes.
optionsobjectOptional arguments to enable specific features of builds.
createTimestringOutput only. Time at which the request to create the build was received.
imagesarrayA 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.
approvalobjectBuildApproval describes a build's approval configuration, state, and result.
tagsarrayTags for annotation of a Build. These are not docker tags.
finishTimestringOutput 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.
sourceProvenanceobjectProvenance of the source. Ways to find the original source, or verify that some source was used for this build.
artifactsobjectArtifacts produced by a build that should be uploaded upon successful completion of all build steps.
serviceAccountstringIAM 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.
logsBucketstringCloud 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.
warningsarrayOutput only. Non-fatal problems encountered during the execution of the build.
substitutionsobjectSubstitutions data for Build resource.
sourceobjectLocation of the source in a supported storage service.
statusDetailstringOutput only. Customer-readable message about the current status.
resultsobjectArtifacts created by the build pipeline.
projectIdstringOutput only. ID of the project.
statusstringOutput only. Status of the build.
secretsarraySecrets 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
buildTriggerIdstringOutput only. The ID of the BuildTrigger that triggered this build, if it was triggered automatically.
timingobjectOutput only. Stores timing information for phases of the build. Valid keys are: BUILD: time to execute all build steps. PUSH: time to push all artifacts including docker images and non docker artifacts. 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.
stepsarrayRequired. The operations to be performed on the workspace.

Methods

NameAccessible byRequired ParamsDescription
projects_builds_getSELECTid, projectIdReturns information about a previously requested build. The Build that is returned includes its status (such as SUCCESS, FAILURE, or WORKING), and timing information.
projects_builds_listSELECTprojectIdLists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
projects_locations_builds_getSELECTbuildsId, locationsId, projectsIdReturns information about a previously requested build. The Build that is returned includes its status (such as SUCCESS, FAILURE, or WORKING), and timing information.
projects_locations_builds_listSELECTlocationsId, projectsIdLists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
projects_builds_createINSERTprojectIdStarts a build with the specified configuration. This method returns a long-running Operation, which includes the build ID. Pass the build ID to GetBuild to determine the build status (such as SUCCESS or FAILURE).
projects_locations_builds_createINSERTlocationsId, projectsIdStarts a build with the specified configuration. This method returns a long-running Operation, which includes the build ID. Pass the build ID to GetBuild to determine the build status (such as SUCCESS or FAILURE).
_projects_builds_listEXECprojectIdLists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
_projects_locations_builds_listEXEClocationsId, projectsIdLists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
projects_builds_approveEXECbuildsId, projectsIdApproves or rejects a pending build. If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. If rejected, the returned LRO will be immediately done.
projects_builds_cancelEXECid, projectIdCancels a build in progress.
projects_builds_retryEXECid, projectIdCreates a new build based on the specified build. This method creates a new build using the original build request, which may or may not result in an identical build. For triggered builds: Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision. For non-triggered builds that specify RepoSource: If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build. If the original build specified a commit sha or revision ID, the retried build will use the identical source. For builds that specify StorageSource: If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source. * If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
projects_locations_builds_approveEXECbuildsId, locationsId, projectsIdApproves or rejects a pending build. If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. If rejected, the returned LRO will be immediately done.
projects_locations_builds_cancelEXECbuildsId, locationsId, projectsIdCancels a build in progress.
projects_locations_builds_retryEXECbuildsId, locationsId, projectsIdCreates a new build based on the specified build. This method creates a new build using the original build request, which may or may not result in an identical build. For triggered builds: Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision. For non-triggered builds that specify RepoSource: If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build. If the original build specified a commit sha or revision ID, the retried build will use the identical source. For builds that specify StorageSource: If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source. * If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.