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.



2374
2375
2376
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2374

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

Instance Attribute Details

#descriptionString

Description of the task. Corresponds to the JSON property description

Returns:

  • (String)


2336
2337
2338
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2336

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>)


2342
2343
2344
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2342

def managed_sidecars
  @managed_sidecars
end

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

List of parameters. Corresponds to the JSON property params



2347
2348
2349
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2347

def params
  @params
end

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

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



2352
2353
2354
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2352

def results
  @results
end

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

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



2357
2358
2359
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2357

def sidecars
  @sidecars
end

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

Steps of the task. Corresponds to the JSON property steps



2362
2363
2364
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2362

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



2367
2368
2369
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2367

def volumes
  @volumes
end

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

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



2372
2373
2374
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2372

def workspaces
  @workspaces
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2379

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)
  @steps = args[:steps] if args.key?(:steps)
  @volumes = args[:volumes] if args.key?(:volumes)
  @workspaces = args[:workspaces] if args.key?(:workspaces)
end