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.



4479
4480
4481
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 4479

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)


4470
4471
4472
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 4470

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)


4477
4478
4479
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 4477

def machine_type
  @machine_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4484
4485
4486
4487
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 4484

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