Class: Google::Apis::CloudbuildV2::PipelineTask
- Inherits:
-
Object
- Object
- Google::Apis::CloudbuildV2::PipelineTask
- 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
-
#name ⇒ String
Name of the task.
-
#params ⇒ Array<Google::Apis::CloudbuildV2::Param>
Params is a list of parameter names and values.
-
#retries ⇒ Fixnum
Retries represents how many times this task should be retried in case of task failure.
-
#run_after ⇒ Array<String>
RunAfter is the list of PipelineTask names that should be executed before this Task executes.
-
#task_ref ⇒ Google::Apis::CloudbuildV2::TaskRef
TaskRef can be used to refer to a specific instance of a task.
-
#task_spec ⇒ Google::Apis::CloudbuildV2::EmbeddedTask
EmbeddedTask defines a Task that is embedded in a Pipeline.
-
#timeout ⇒ String
Time after which the TaskRun times out.
-
#when_expressions ⇒ Array<Google::Apis::CloudbuildV2::WhenExpression>
Conditions that need to be true for the task to run.
-
#workspaces ⇒ Array<Google::Apis::CloudbuildV2::WorkspacePipelineTaskBinding>
Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PipelineTask
constructor
A new instance of PipelineTask.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PipelineTask
Returns a new instance of PipelineTask.
1666 1667 1668 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1666 def initialize(**args) update!(**args) end |
Instance Attribute Details
#name ⇒ String
Name of the task.
Corresponds to the JSON property name
1619 1620 1621 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1619 def name @name end |
#params ⇒ Array<Google::Apis::CloudbuildV2::Param>
Params is a list of parameter names and values.
Corresponds to the JSON property params
1624 1625 1626 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1624 def params @params end |
#retries ⇒ Fixnum
Retries represents how many times this task should be retried in case of task
failure.
Corresponds to the JSON property retries
1630 1631 1632 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1630 def retries @retries end |
#run_after ⇒ Array<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
1636 1637 1638 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1636 def run_after @run_after end |
#task_ref ⇒ Google::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
1642 1643 1644 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1642 def task_ref @task_ref end |
#task_spec ⇒ Google::Apis::CloudbuildV2::EmbeddedTask
EmbeddedTask defines a Task that is embedded in a Pipeline.
Corresponds to the JSON property taskSpec
1647 1648 1649 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1647 def task_spec @task_spec end |
#timeout ⇒ String
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
1653 1654 1655 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1653 def timeout @timeout end |
#when_expressions ⇒ Array<Google::Apis::CloudbuildV2::WhenExpression>
Conditions that need to be true for the task to run.
Corresponds to the JSON property whenExpressions
1658 1659 1660 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1658 def when_expressions @when_expressions end |
#workspaces ⇒ Array<Google::Apis::CloudbuildV2::WorkspacePipelineTaskBinding>
Workspaces maps workspaces from the pipeline spec to the workspaces declared
in the Task.
Corresponds to the JSON property workspaces
1664 1665 1666 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1664 def workspaces @workspaces end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 |
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 1671 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 |