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
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ source_provenance_hash |
int[]
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 1000GB; 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. |
↳ log_streaming_option |
int
Option to define build log streaming behavior to Google Cloud Storage. |
↳ worker_pool |
string
Option to specify a |
↳ logging |
int
Option to specify the logging mode, which determines if and where build logs are stored. |
↳ 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". |
↳ secret_env |
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 |
↳ 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. |
getSourceProvenanceHash
Requested hash for SourceProvenance.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setSourceProvenanceHash
Requested hash for SourceProvenance.
Parameter | |
---|---|
Name | Description |
var |
int[]
|
Returns | |
---|---|
Type | Description |
$this |
getRequestedVerifyOption
Requested verifiability options.
Returns | |
---|---|
Type | Description |
int |
setRequestedVerifyOption
Requested verifiability options.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getMachineType
Compute Engine machine type on which to run the build.
Returns | |
---|---|
Type | Description |
int |
setMachineType
Compute Engine machine type on which to run the build.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$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 1000GB; builds that request more than the maximum are rejected with an error.
Returns | |
---|---|
Type | Description |
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 1000GB; builds that request more than the maximum are rejected with an error.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
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.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
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.
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getLogStreamingOption
Option to define build log streaming behavior to Google Cloud Storage.
Returns | |
---|---|
Type | Description |
int |
setLogStreamingOption
Option to define build log streaming behavior to Google Cloud Storage.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getWorkerPool
Option to specify a WorkerPool
for the build.
Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is experimental.
Returns | |
---|---|
Type | Description |
string |
setWorkerPool
Option to specify a WorkerPool
for the build.
Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is experimental.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLogging
Option to specify the logging mode, which determines if and where build logs are stored.
Returns | |
---|---|
Type | Description |
int |
setLogging
Option to specify the logging mode, which determines if and where build logs are stored.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$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".
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
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".
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
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.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
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.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Build\V1\Volume>
|
Returns | |
---|---|
Type | Description |
$this |