Class: Google::Apis::CloudbuildV2::PipelineTask

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

PipelineTask defines a task in a Pipeline.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PipelineTask

Returns a new instance of PipelineTask.



1587
1588
1589
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1587

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

Instance Attribute Details

#nameString

Name of the task. Corresponds to the JSON property name

Returns:

  • (String)


1540
1541
1542
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1540

def name
  @name
end

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

Params is a list of parameter names and values. Corresponds to the JSON property params



1545
1546
1547
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1545

def params
  @params
end

#retriesFixnum

Retries represents how many times this task should be retried in case of task failure. Corresponds to the JSON property retries

Returns:

  • (Fixnum)


1551
1552
1553
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1551

def retries
  @retries
end

#run_afterArray<String>

RunAfter is the list of PipelineTask names that should be executed before this Task executes. (Used to force a specific ordering in graph execution.) Corresponds to the JSON property runAfter

Returns:

  • (Array<String>)


1557
1558
1559
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1557

def run_after
  @run_after
end

#task_refGoogle::Apis::CloudbuildV2::TaskRef

TaskRef can be used to refer to a specific instance of a task. PipelineRef can be used to refer to a specific instance of a Pipeline. Corresponds to the JSON property taskRef



1563
1564
1565
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1563

def task_ref
  @task_ref
end

#task_specGoogle::Apis::CloudbuildV2::EmbeddedTask

EmbeddedTask defines a Task that is embedded in a Pipeline. Corresponds to the JSON property taskSpec



1568
1569
1570
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1568

def task_spec
  @task_spec
end

#timeoutString

Time after which the TaskRun times out. Defaults to 1 hour. Specified TaskRun timeout should be less than 24h. Corresponds to the JSON property timeout

Returns:

  • (String)


1574
1575
1576
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1574

def timeout
  @timeout
end

#when_expressionsArray<Google::Apis::CloudbuildV2::WhenExpression>

Conditions that need to be true for the task to run. Corresponds to the JSON property whenExpressions



1579
1580
1581
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1579

def when_expressions
  @when_expressions
end

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

Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task. Corresponds to the JSON property workspaces



1585
1586
1587
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1585

def workspaces
  @workspaces
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1592

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @params = args[:params] if args.key?(:params)
  @retries = args[:retries] if args.key?(:retries)
  @run_after = args[:run_after] if args.key?(:run_after)
  @task_ref = args[:task_ref] if args.key?(:task_ref)
  @task_spec = args[:task_spec] if args.key?(:task_spec)
  @timeout = args[:timeout] if args.key?(:timeout)
  @when_expressions = args[:when_expressions] if args.key?(:when_expressions)
  @workspaces = args[:workspaces] if args.key?(:workspaces)
end