Class: Google::Apis::CloudbuildV1::WorkerConfig

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

Defines the configuration to be used for creating workers in the pool.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WorkerConfig

Returns a new instance of WorkerConfig.



4534
4535
4536
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 4534

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

Instance Attribute Details

#disk_size_gbFixnum

Size of the disk attached to the worker, in GB. See Worker pool config file. Specify a value of up to 2000. If 0 is specified, Cloud Build will use a standard disk size. Corresponds to the JSON property diskSizeGb

Returns:

  • (Fixnum)


4525
4526
4527
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 4525

def disk_size_gb
  @disk_size_gb
end

#machine_typeString

Optional. Machine type of a worker, such as e2-medium. See Worker pool config file. If left blank, Cloud Build will use a sensible default. Corresponds to the JSON property machineType

Returns:

  • (String)


4532
4533
4534
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 4532

def machine_type
  @machine_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4539
4540
4541
4542
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 4539

def update!(**args)
  @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
  @machine_type = args[:machine_type] if args.key?(:machine_type)
end