Class: Google::Apis::CloudbuildV1::BuildOptions

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudbuild_v1/classes.rb,
lib/google/apis/cloudbuild_v1/representations.rb,
lib/google/apis/cloudbuild_v1/representations.rb

Overview

Optional arguments to enable specific features of builds.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BuildOptions

Returns a new instance of BuildOptions.



446
447
448
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 446

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#disk_size_gbFixnum

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. Corresponds to the JSON property diskSizeGb

Returns:

  • (Fixnum)


370
371
372
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 370

def disk_size_gb
  @disk_size_gb
end

#dynamic_substitutionsBoolean Also known as: dynamic_substitutions?

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. Corresponds to the JSON property dynamicSubstitutions

Returns:

  • (Boolean)


377
378
379
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 377

def dynamic_substitutions
  @dynamic_substitutions
end

#envArray<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". Corresponds to the JSON property env

Returns:

  • (Array<String>)


387
388
389
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 387

def env
  @env
end

#log_streaming_optionString

Option to define build log streaming behavior to Google Cloud Storage. Corresponds to the JSON property logStreamingOption

Returns:

  • (String)


392
393
394
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 392

def log_streaming_option
  @log_streaming_option
end

#loggingString

Option to specify the logging mode, which determines if and where build logs are stored. Corresponds to the JSON property logging

Returns:

  • (String)


398
399
400
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 398

def logging
  @logging
end

#machine_typeString

Compute Engine machine type on which to run the build. Corresponds to the JSON property machineType

Returns:

  • (String)


403
404
405
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 403

def machine_type
  @machine_type
end

#requested_verify_optionString

Requested verifiability options. Corresponds to the JSON property requestedVerifyOption

Returns:

  • (String)


408
409
410
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 408

def requested_verify_option
  @requested_verify_option
end

#secret_envArray<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 Secret. These variables will be available to all build steps in this build. Corresponds to the JSON property secretEnv

Returns:

  • (Array<String>)


415
416
417
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 415

def secret_env
  @secret_env
end

#source_provenance_hashArray<String>

Requested hash for SourceProvenance. Corresponds to the JSON property sourceProvenanceHash

Returns:

  • (Array<String>)


420
421
422
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 420

def source_provenance_hash
  @source_provenance_hash
end

#substitution_optionString

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. Corresponds to the JSON property substitutionOption

Returns:

  • (String)


427
428
429
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 427

def substitution_option
  @substitution_option
end

#volumesArray<Google::Apis::CloudbuildV1::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. Corresponds to the JSON property volumes



437
438
439
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 437

def volumes
  @volumes
end

#worker_poolString

Option to specify a WorkerPool for the build. Format: projects/project/ locations/location/workerPools/workerPool This field is in beta and is available only to restricted users. Corresponds to the JSON property workerPool

Returns:

  • (String)


444
445
446
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 444

def worker_pool
  @worker_pool
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



451
452
453
454
455
456
457
458
459
460
461
462
463
464
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 451

def update!(**args)
  @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
  @dynamic_substitutions = args[:dynamic_substitutions] if args.key?(:dynamic_substitutions)
  @env = args[:env] if args.key?(:env)
  @log_streaming_option = args[:log_streaming_option] if args.key?(:log_streaming_option)
  @logging = args[:logging] if args.key?(:logging)
  @machine_type = args[:machine_type] if args.key?(:machine_type)
  @requested_verify_option = args[:requested_verify_option] if args.key?(:requested_verify_option)
  @secret_env = args[:secret_env] if args.key?(:secret_env)
  @source_provenance_hash = args[:source_provenance_hash] if args.key?(:source_provenance_hash)
  @substitution_option = args[:substitution_option] if args.key?(:substitution_option)
  @volumes = args[:volumes] if args.key?(:volumes)
  @worker_pool = args[:worker_pool] if args.key?(:worker_pool)
end