Class: Google::Apis::CloudbuildV1alpha1::Volume

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

Overview

Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Volume

Returns a new instance of Volume.


1411
1412
1413
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1411

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

Instance Attribute Details

#nameString

Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. Corresponds to the JSON property name

Returns:

  • (String)

1402
1403
1404
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1402

def name
  @name
end

#pathString

Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. Corresponds to the JSON property path

Returns:

  • (String)

1409
1410
1411
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1409

def path
  @path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1416
1417
1418
1419
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1416

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