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.



2824
2825
2826
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2824

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 1000. If 0 is specified, Cloud Build will use a standard disk size. Corresponds to the JSON property diskSizeGb

Returns:

  • (Fixnum)


2815
2816
2817
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2815

def disk_size_gb
  @disk_size_gb
end

#machine_typeString

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)


2822
2823
2824
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2822

def machine_type
  @machine_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2829
2830
2831
2832
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2829

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