Class Build.Builder (3.8.0)

Stay organized with collections Save and categorize content based on your preferences.
public static final class Build.Builder extends GeneratedMessageV3.Builder<Build.Builder> implements BuildOrBuilder

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.
  • $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.

Protobuf type google.devtools.cloudbuild.v1.Build

Implements

BuildOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllImages(Iterable<String> values)

public Build.Builder addAllImages(Iterable<String> values)

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.

repeated string images = 13;

Parameter
NameDescription
valuesIterable<String>

The images to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addAllSecrets(Iterable<? extends Secret> values)

public Build.Builder addAllSecrets(Iterable<? extends Secret> values)

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

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
valuesIterable<? extends com.google.cloudbuild.v1.Secret>
Returns
TypeDescription
Build.Builder

addAllSteps(Iterable<? extends BuildStep> values)

public Build.Builder addAllSteps(Iterable<? extends BuildStep> values)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
valuesIterable<? extends com.google.cloudbuild.v1.BuildStep>
Returns
TypeDescription
Build.Builder

addAllTags(Iterable<String> values)

public Build.Builder addAllTags(Iterable<String> values)

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

repeated string tags = 31;

Parameter
NameDescription
valuesIterable<String>

The tags to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addAllWarnings(Iterable<? extends Build.Warning> values)

public Build.Builder addAllWarnings(Iterable<? extends Build.Warning> values)

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

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuesIterable<? extends com.google.cloudbuild.v1.Build.Warning>
Returns
TypeDescription
Build.Builder

addImages(String value)

public Build.Builder addImages(String value)

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.

repeated string images = 13;

Parameter
NameDescription
valueString

The images to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addImagesBytes(ByteString value)

public Build.Builder addImagesBytes(ByteString value)

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.

repeated string images = 13;

Parameter
NameDescription
valueByteString

The bytes of the images to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Build.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Build.Builder
Overrides

addSecrets(Secret value)

public Build.Builder addSecrets(Secret value)

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

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
valueSecret
Returns
TypeDescription
Build.Builder

addSecrets(Secret.Builder builderForValue)

public Build.Builder addSecrets(Secret.Builder builderForValue)

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

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
builderForValueSecret.Builder
Returns
TypeDescription
Build.Builder

addSecrets(int index, Secret value)

public Build.Builder addSecrets(int index, Secret value)

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

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameters
NameDescription
indexint
valueSecret
Returns
TypeDescription
Build.Builder

addSecrets(int index, Secret.Builder builderForValue)

public Build.Builder addSecrets(int index, Secret.Builder builderForValue)

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

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameters
NameDescription
indexint
builderForValueSecret.Builder
Returns
TypeDescription
Build.Builder

addSecretsBuilder()

public Secret.Builder addSecretsBuilder()

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

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Returns
TypeDescription
Secret.Builder

addSecretsBuilder(int index)

public Secret.Builder addSecretsBuilder(int index)

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

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
indexint
Returns
TypeDescription
Secret.Builder

addSteps(BuildStep value)

public Build.Builder addSteps(BuildStep value)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
valueBuildStep
Returns
TypeDescription
Build.Builder

addSteps(BuildStep.Builder builderForValue)

public Build.Builder addSteps(BuildStep.Builder builderForValue)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
builderForValueBuildStep.Builder
Returns
TypeDescription
Build.Builder

addSteps(int index, BuildStep value)

public Build.Builder addSteps(int index, BuildStep value)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameters
NameDescription
indexint
valueBuildStep
Returns
TypeDescription
Build.Builder

addSteps(int index, BuildStep.Builder builderForValue)

public Build.Builder addSteps(int index, BuildStep.Builder builderForValue)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameters
NameDescription
indexint
builderForValueBuildStep.Builder
Returns
TypeDescription
Build.Builder

addStepsBuilder()

public BuildStep.Builder addStepsBuilder()

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Returns
TypeDescription
BuildStep.Builder

addStepsBuilder(int index)

public BuildStep.Builder addStepsBuilder(int index)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
BuildStep.Builder

addTags(String value)

public Build.Builder addTags(String value)

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

repeated string tags = 31;

Parameter
NameDescription
valueString

The tags to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addTagsBytes(ByteString value)

public Build.Builder addTagsBytes(ByteString value)

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

repeated string tags = 31;

Parameter
NameDescription
valueByteString

The bytes of the tags to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addWarnings(Build.Warning value)

public Build.Builder addWarnings(Build.Warning value)

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

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueBuild.Warning
Returns
TypeDescription
Build.Builder

addWarnings(Build.Warning.Builder builderForValue)

public Build.Builder addWarnings(Build.Warning.Builder builderForValue)

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

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuild.Warning.Builder
Returns
TypeDescription
Build.Builder

addWarnings(int index, Build.Warning value)

public Build.Builder addWarnings(int index, Build.Warning value)

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

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
valueBuild.Warning
Returns
TypeDescription
Build.Builder

addWarnings(int index, Build.Warning.Builder builderForValue)

public Build.Builder addWarnings(int index, Build.Warning.Builder builderForValue)

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

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
builderForValueBuild.Warning.Builder
Returns
TypeDescription
Build.Builder

addWarningsBuilder()

public Build.Warning.Builder addWarningsBuilder()

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

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Warning.Builder

addWarningsBuilder(int index)

public Build.Warning.Builder addWarningsBuilder(int index)

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

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
Build.Warning.Builder

build()

public Build build()
Returns
TypeDescription
Build

buildPartial()

public Build buildPartial()
Returns
TypeDescription
Build

clear()

public Build.Builder clear()
Returns
TypeDescription
Build.Builder
Overrides

clearApproval()

public Build.Builder clearApproval()

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

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearArtifacts()

public Build.Builder clearArtifacts()

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

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Returns
TypeDescription
Build.Builder

clearAvailableSecrets()

public Build.Builder clearAvailableSecrets()

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Returns
TypeDescription
Build.Builder

clearBuildTriggerId()

public Build.Builder clearBuildTriggerId()

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

string build_trigger_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearCreateTime()

public Build.Builder clearCreateTime()

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

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearFailureInfo()

public Build.Builder clearFailureInfo()

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

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearField(Descriptors.FieldDescriptor field)

public Build.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Build.Builder
Overrides

clearFinishTime()

public Build.Builder clearFinishTime()

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.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearId()

public Build.Builder clearId()

Output only. Unique identifier of the build.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearImages()

public Build.Builder clearImages()

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.

repeated string images = 13;

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearLogUrl()

public Build.Builder clearLogUrl()

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

string log_url = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearLogsBucket()

public Build.Builder clearLogsBucket()

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.

string logs_bucket = 19;

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearName()

public Build.Builder clearName()

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

string name = 45 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Build.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Build.Builder
Overrides

clearOptions()

public Build.Builder clearOptions()

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Returns
TypeDescription
Build.Builder

clearProjectId()

public Build.Builder clearProjectId()

Output only. ID of the project.

string project_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearQueueTtl()

public Build.Builder clearQueueTtl()

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.

.google.protobuf.Duration queue_ttl = 40;

Returns
TypeDescription
Build.Builder

clearResults()

public Build.Builder clearResults()

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearSecrets()

public Build.Builder clearSecrets()

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

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Returns
TypeDescription
Build.Builder

clearServiceAccount()

public Build.Builder clearServiceAccount()

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.

string service_account = 42 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearSource()

public Build.Builder clearSource()

The location of the source files to build.

.google.devtools.cloudbuild.v1.Source source = 3;

Returns
TypeDescription
Build.Builder

clearSourceProvenance()

public Build.Builder clearSourceProvenance()

Output only. A permanent fixed identifier for source.

.google.devtools.cloudbuild.v1.SourceProvenance source_provenance = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearStartTime()

public Build.Builder clearStartTime()

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

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearStatus()

public Build.Builder clearStatus()

Output only. Status of the build.

.google.devtools.cloudbuild.v1.Build.Status status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearStatusDetail()

public Build.Builder clearStatusDetail()

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

string status_detail = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearSteps()

public Build.Builder clearSteps()

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Returns
TypeDescription
Build.Builder

clearSubstitutions()

public Build.Builder clearSubstitutions()
Returns
TypeDescription
Build.Builder

clearTags()

public Build.Builder clearTags()

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

repeated string tags = 31;

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearTimeout()

public Build.Builder clearTimeout()

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.

.google.protobuf.Duration timeout = 12;

Returns
TypeDescription
Build.Builder

clearTiming()

public Build.Builder clearTiming()
Returns
TypeDescription
Build.Builder

clearWarnings()

public Build.Builder clearWarnings()

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

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clone()

public Build.Builder clone()
Returns
TypeDescription
Build.Builder
Overrides

containsSubstitutions(String key)

public boolean containsSubstitutions(String key)

Substitutions data for Build resource.

map<string, string> substitutions = 29;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsTiming(String key)

public boolean containsTiming(String key)

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.

map<string, .google.devtools.cloudbuild.v1.TimeSpan> timing = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getApproval()

public BuildApproval getApproval()

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

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BuildApproval

The approval.

getApprovalBuilder()

public BuildApproval.Builder getApprovalBuilder()

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

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BuildApproval.Builder

getApprovalOrBuilder()

public BuildApprovalOrBuilder getApprovalOrBuilder()

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

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BuildApprovalOrBuilder

getArtifacts()

public Artifacts getArtifacts()

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

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Returns
TypeDescription
Artifacts

The artifacts.

getArtifactsBuilder()

public Artifacts.Builder getArtifactsBuilder()

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

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Returns
TypeDescription
Artifacts.Builder

getArtifactsOrBuilder()

public ArtifactsOrBuilder getArtifactsOrBuilder()

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

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Returns
TypeDescription
ArtifactsOrBuilder

getAvailableSecrets()

public Secrets getAvailableSecrets()

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Returns
TypeDescription
Secrets

The availableSecrets.

getAvailableSecretsBuilder()

public Secrets.Builder getAvailableSecretsBuilder()

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Returns
TypeDescription
Secrets.Builder

getAvailableSecretsOrBuilder()

public SecretsOrBuilder getAvailableSecretsOrBuilder()

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Returns
TypeDescription
SecretsOrBuilder

getBuildTriggerId()

public String getBuildTriggerId()

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

string build_trigger_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The buildTriggerId.

getBuildTriggerIdBytes()

public ByteString getBuildTriggerIdBytes()

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

string build_trigger_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for buildTriggerId.

getCreateTime()

public Timestamp getCreateTime()

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

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

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

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

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

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Build getDefaultInstanceForType()
Returns
TypeDescription
Build

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFailureInfo()

public Build.FailureInfo getFailureInfo()

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

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.FailureInfo

The failureInfo.

getFailureInfoBuilder()

public Build.FailureInfo.Builder getFailureInfoBuilder()

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

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.FailureInfo.Builder

getFailureInfoOrBuilder()

public Build.FailureInfoOrBuilder getFailureInfoOrBuilder()

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

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.FailureInfoOrBuilder

getFinishTime()

public Timestamp getFinishTime()

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.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The finishTime.

getFinishTimeBuilder()

public Timestamp.Builder getFinishTimeBuilder()

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.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getFinishTimeOrBuilder()

public TimestampOrBuilder getFinishTimeOrBuilder()

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.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getId()

public String getId()

Output only. Unique identifier of the build.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Output only. Unique identifier of the build.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for id.

getImages(int index)

public String getImages(int index)

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.

repeated string images = 13;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The images at the given index.

getImagesBytes(int index)

public ByteString getImagesBytes(int index)

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.

repeated string images = 13;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the images at the given index.

getImagesCount()

public int getImagesCount()

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.

repeated string images = 13;

Returns
TypeDescription
int

The count of images.

getImagesList()

public ProtocolStringList getImagesList()

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.

repeated string images = 13;

Returns
TypeDescription
ProtocolStringList

A list containing the images.

getLogUrl()

public String getLogUrl()

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

string log_url = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The logUrl.

getLogUrlBytes()

public ByteString getLogUrlBytes()

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

string log_url = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for logUrl.

getLogsBucket()

public String getLogsBucket()

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.

string logs_bucket = 19;

Returns
TypeDescription
String

The logsBucket.

getLogsBucketBytes()

public ByteString getLogsBucketBytes()

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.

string logs_bucket = 19;

Returns
TypeDescription
ByteString

The bytes for logsBucket.

getMutableSubstitutions()

public Map<String,String> getMutableSubstitutions()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getMutableTiming()

public Map<String,TimeSpan> getMutableTiming()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,TimeSpan>

getName()

public String getName()

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

string name = 45 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 45 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for name.

getOptions()

public BuildOptions getOptions()

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Returns
TypeDescription
BuildOptions

The options.

getOptionsBuilder()

public BuildOptions.Builder getOptionsBuilder()

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Returns
TypeDescription
BuildOptions.Builder

getOptionsOrBuilder()

public BuildOptionsOrBuilder getOptionsOrBuilder()

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Returns
TypeDescription
BuildOptionsOrBuilder

getProjectId()

public String getProjectId()

Output only. ID of the project.

string project_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The projectId.

getProjectIdBytes()

public ByteString getProjectIdBytes()

Output only. ID of the project.

string project_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for projectId.

getQueueTtl()

public Duration getQueueTtl()

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.

.google.protobuf.Duration queue_ttl = 40;

Returns
TypeDescription
Duration

The queueTtl.

getQueueTtlBuilder()

public Duration.Builder getQueueTtlBuilder()

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.

.google.protobuf.Duration queue_ttl = 40;

Returns
TypeDescription
Builder

getQueueTtlOrBuilder()

public DurationOrBuilder getQueueTtlOrBuilder()

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.

.google.protobuf.Duration queue_ttl = 40;

Returns
TypeDescription
DurationOrBuilder

getResults()

public Results getResults()

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Results

The results.

getResultsBuilder()

public Results.Builder getResultsBuilder()

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Results.Builder

getResultsOrBuilder()

public ResultsOrBuilder getResultsOrBuilder()

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ResultsOrBuilder

getSecrets(int index)

public Secret getSecrets(int index)

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

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
indexint
Returns
TypeDescription
Secret

getSecretsBuilder(int index)

public Secret.Builder getSecretsBuilder(int index)

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 acce