Reference documentation and code samples for the Google Cloud Build V1 Client class BuildOptions.
Optional arguments to enable specific features of builds.
Generated from protobuf message google.devtools.cloudbuild.v1.BuildOptions
Namespace
Google \ Cloud \ Build \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ source_provenance_hash
array
Requested hash for SourceProvenance.
↳ requested_verify_option
int
Requested verifiability options.
↳ machine_type
int
Compute Engine machine type on which to run the build.
↳ disk_size_gb
int|string
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
int
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.
↳ automap_substitutions
bool
Option to include built-in and custom substitutions as env variables for all build steps.
↳ log_streaming_option
int
Option to define build log streaming behavior to Cloud Storage.
↳ worker_pool
string
This field deprecated; please use pool.name
instead.
↳ pool
Google\Cloud\Build\V1\BuildOptions\PoolOption
Optional. Specification for execution on a WorkerPool
. See running builds in a private pool
for more information.
↳ logging
int
Option to specify the logging mode, which determines if and where build logs are stored.
↳ env
array
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
array
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
array< Google\Cloud\Build\V1\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
int
Optional. Option to specify how default logs buckets are setup.
getSourceProvenanceHash
Requested hash for SourceProvenance.
setSourceProvenanceHash
Requested hash for SourceProvenance.
var
int[]
$this
getRequestedVerifyOption
Requested verifiability options.
int
setRequestedVerifyOption
Requested verifiability options.
var
int
$this
getMachineType
Compute Engine machine type on which to run the build.
int
setMachineType
Compute Engine machine type on which to run the build.
var
int
$this
getDiskSizeGb
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.
int|string
setDiskSizeGb
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.
var
int|string
$this
getSubstitutionOption
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.
int
setSubstitutionOption
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.
var
int
$this
getDynamicSubstitutions
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.
bool
setDynamicSubstitutions
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.
var
bool
$this
getAutomapSubstitutions
Option to include built-in and custom substitutions as env variables for all build steps.
bool
setAutomapSubstitutions
Option to include built-in and custom substitutions as env variables for all build steps.
var
bool
$this
getLogStreamingOption
Option to define build log streaming behavior to Cloud Storage.
int
setLogStreamingOption
Option to define build log streaming behavior to Cloud Storage.
var
int
$this
getWorkerPool
This field deprecated; please use pool.name
instead.
string
setWorkerPool
This field deprecated; please use pool.name
instead.
var
string
$this
getPool
Optional. Specification for execution on a WorkerPool
.
See running builds in a private pool for more information.
hasPool
clearPool
setPool
Optional. Specification for execution on a WorkerPool
.
See running builds in a private pool for more information.
$this
getLogging
Option to specify the logging mode, which determines if and where build logs are stored.
int
setLogging
Option to specify the logging mode, which determines if and where build logs are stored.
var
int
$this
getEnv
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".
setEnv
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".
var
string[]
$this
getSecretEnv
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.
setSecretEnv
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.
var
string[]
$this
getVolumes
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.
setVolumes
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.
$this
getDefaultLogsBucketBehavior
Optional. Option to specify how default logs buckets are setup.
int
setDefaultLogsBucketBehavior
Optional. Option to specify how default logs buckets are setup.
var
int
$this