Class: Google::Apis::CloudbuildV2::TaskSpec

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

Overview

TaskSpec contains the Spec to instantiate a TaskRun.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TaskSpec

Returns a new instance of TaskSpec.



2777
2778
2779
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2777

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

Instance Attribute Details

#descriptionString

Description of the task. Corresponds to the JSON property description

Returns:

  • (String)


2733
2734
2735
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2733

def description
  @description
end

#managed_sidecarsArray<String>

Sidecars that run alongside the Task’s step containers that should be added to this Task. Corresponds to the JSON property managedSidecars

Returns:

  • (Array<String>)


2739
2740
2741
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2739

def managed_sidecars
  @managed_sidecars
end

#paramsArray<Google::Apis::CloudbuildV2::ParamSpec>

List of parameters. Corresponds to the JSON property params



2744
2745
2746
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2744

def params
  @params
end

#resultsArray<Google::Apis::CloudbuildV2::TaskResult>

Values that this Task can output. Corresponds to the JSON property results



2749
2750
2751
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2749

def results
  @results
end

#sidecarsArray<Google::Apis::CloudbuildV2::Sidecar>

Sidecars that run alongside the Task's step containers. Corresponds to the JSON property sidecars



2754
2755
2756
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2754

def sidecars
  @sidecars
end

#step_templateGoogle::Apis::CloudbuildV2::StepTemplate

StepTemplate can be used as the basis for all step containers within the Task, so that the steps inherit settings on the base container. Corresponds to the JSON property stepTemplate



2760
2761
2762
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2760

def step_template
  @step_template
end

#stepsArray<Google::Apis::CloudbuildV2::Step>

Steps of the task. Corresponds to the JSON property steps



2765
2766
2767
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2765

def steps
  @steps
end

#volumesArray<Google::Apis::CloudbuildV2::VolumeSource>

A collection of volumes that are available to mount into steps. Corresponds to the JSON property volumes



2770
2771
2772
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2770

def volumes
  @volumes
end

#workspacesArray<Google::Apis::CloudbuildV2::WorkspaceDeclaration>

The volumes that this Task requires. Corresponds to the JSON property workspaces



2775
2776
2777
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2775

def workspaces
  @workspaces
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2782

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @managed_sidecars = args[:managed_sidecars] if args.key?(:managed_sidecars)
  @params = args[:params] if args.key?(:params)
  @results = args[:results] if args.key?(:results)
  @sidecars = args[:sidecars] if args.key?(:sidecars)
  @step_template = args[:step_template] if args.key?(:step_template)
  @steps = args[:steps] if args.key?(:steps)
  @volumes = args[:volumes] if args.key?(:volumes)
  @workspaces = args[:workspaces] if args.key?(:workspaces)
end