Class BuildOptions (3.16.0)

BuildOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Optional arguments to enable specific features of builds.

Attributes

NameDescription
source_provenance_hash MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Hash.HashType]
Requested hash for SourceProvenance.
requested_verify_option google.cloud.devtools.cloudbuild_v1.types.BuildOptions.VerifyOption
Requested verifiability options.
machine_type google.cloud.devtools.cloudbuild_v1.types.BuildOptions.MachineType
Compute Engine machine type on which to run the build.
disk_size_gb int
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 2000GB; builds that request more than the maximum are rejected with an error.
substitution_option google.cloud.devtools.cloudbuild_v1.types.BuildOptions.SubstitutionOption
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.
dynamic_substitutions bool
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.
log_streaming_option google.cloud.devtools.cloudbuild_v1.types.BuildOptions.LogStreamingOption
Option to define build log streaming behavior to Google Cloud Storage.
worker_pool str
This field deprecated; please use pool.name instead.
pool google.cloud.devtools.cloudbuild_v1.types.BuildOptions.PoolOption
Optional. Specification for execution on a WorkerPool. See `running builds in a private pool
logging google.cloud.devtools.cloudbuild_v1.types.BuildOptions.LoggingMode
Option to specify the logging mode, which determines if and where build logs are stored.
env MutableSequence[str]
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".
secret_env MutableSequence[str]
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.
volumes MutableSequence[google.cloud.devtools.cloudbuild_v1.types.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.
default_logs_bucket_behavior google.cloud.devtools.cloudbuild_v1.types.BuildOptions.DefaultLogsBucketBehavior
Optional. Option to specify how default logs buckets are setup.

Classes

DefaultLogsBucketBehavior

DefaultLogsBucketBehavior(value)

Default GCS log bucket behavior options.

Values: DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED (0): Unspecified. REGIONAL_USER_OWNED_BUCKET (1): Bucket is located in user-owned project in the same region as the build. The builder service account must have access to create and write to GCS buckets in the build project.

LogStreamingOption

LogStreamingOption(value)

Specifies the behavior when writing build logs to Google Cloud Storage.

Values: STREAM_DEFAULT (0): Service may automatically determine build log streaming behavior. STREAM_ON (1): Build logs should be streamed to Google Cloud Storage. STREAM_OFF (2): Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed.

LoggingMode

LoggingMode(value)

Specifies the logging mode.

Values: LOGGING_UNSPECIFIED (0): 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 (1): Build logs are stored in Cloud Logging and Cloud Storage. GCS_ONLY (2): Build logs are stored in Cloud Storage. STACKDRIVER_ONLY (3): This option is the same as CLOUD_LOGGING_ONLY. CLOUD_LOGGING_ONLY (5): Build logs are stored in Cloud Logging. Selecting this option will not allow logs streaming <https://cloud.google.com/sdk/gcloud/reference/builds/log>__. NONE (4): Turn off all logging. No build logs will be captured.

MachineType

MachineType(value)

Supported Compute Engine machine types. For more information, see Machine types <https://cloud.google.com/compute/docs/machine-types>__.

Values: UNSPECIFIED (0): Standard machine type. N1_HIGHCPU_8 (1): Highcpu machine with 8 CPUs. N1_HIGHCPU_32 (2): Highcpu machine with 32 CPUs. E2_HIGHCPU_8 (5): Highcpu e2 machine with 8 CPUs. E2_HIGHCPU_32 (6): Highcpu e2 machine with 32 CPUs.

PoolOption

PoolOption(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Details about how a build should be executed on a WorkerPool.

See running builds in a private pool <https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool>__ for more information.

SubstitutionOption

SubstitutionOption(value)

Specifies the behavior when there is an error in the substitution checks.

Values: MUST_MATCH (0): Fails the build if error in substitutions checks, like missing a substitution in the template or in the map. ALLOW_LOOSE (1): Do not fail the build if error in substitutions checks.

VerifyOption

VerifyOption(value)

Specifies the manner in which the build should be verified, if at all.

Values: NOT_VERIFIED (0): Not a verifiable build (the default). VERIFIED (1): Build must be verified.