Class: AWSCDK::Pipelines::Step
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Pipelines::Step
- Includes:
- IFileSetProducer
- Defined in:
- pipelines/step.rb
Overview
A generic Step which can be added to a Pipeline.
Steps can be used to add Sources, Build Actions and Validations to your pipeline.
This class is abstract. See specific subclasses of Step for useful steps to add to your Pipeline
Direct Known Subclasses
CodePipelineSource, ConfirmPermissionsBroadening, ManualApprovalStep, ShellStep
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.sequence(steps) ⇒ Array<AWSCDK::Pipelines::Step>
Define a sequence of steps to be executed in order.
Instance Method Summary collapse
-
#add_dependency_file_set(fs) ⇒ void
Add an additional FileSet to the set of file sets required by this step.
-
#add_step_dependency(step) ⇒ void
Add a dependency on another step.
-
#configure_primary_output(fs) ⇒ void
Configure the given FileSet as the primary output of this step.
-
#consumed_stack_outputs ⇒ Array<AWSCDK::Pipelines::StackOutputReference>
StackOutputReferences this step consumes.
-
#dependencies ⇒ Array<AWSCDK::Pipelines::Step>
Return the steps this step depends on, based on the FileSets it requires.
-
#dependency_file_sets ⇒ Array<AWSCDK::Pipelines::FileSet>
The list of FileSets consumed by this Step.
-
#discover_referenced_outputs(structure) ⇒ void
Crawl the given structure for references to StepOutputs and add dependencies on all steps found.
-
#id ⇒ String
Identifier for this step.
-
#initialize(id) ⇒ Step
constructor
A new instance of Step.
-
#is_source ⇒ Boolean
Whether or not this is a Source step.
-
#primary_output ⇒ AWSCDK::Pipelines::FileSet?
The primary FileSet produced by this Step.
-
#to_string ⇒ String
Return a string representation of this Step.
Constructor Details
#initialize(id) ⇒ Step
Returns a new instance of Step.
16 17 18 19 |
# File 'pipelines/step.rb', line 16 def initialize(id) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Object.instance_method(:initialize).bind(self).call(id) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'pipelines/step.rb', line 21 def self.jsii_overridable_methods { :consumed_stack_outputs => { kind: :property, name: "consumedStackOutputs", is_optional: false }, :dependencies => { kind: :property, name: "dependencies", is_optional: false }, :dependency_file_sets => { kind: :property, name: "dependencyFileSets", is_optional: false }, :id => { kind: :property, name: "id", is_optional: false }, :is_source => { kind: :property, name: "isSource", is_optional: false }, :primary_output => { kind: :property, name: "primaryOutput", is_optional: true }, :add_dependency_file_set => { kind: :method, name: "addDependencyFileSet", is_optional: false }, :add_step_dependency => { kind: :method, name: "addStepDependency", is_optional: false }, :configure_primary_output => { kind: :method, name: "configurePrimaryOutput", is_optional: false }, :discover_referenced_outputs => { kind: :method, name: "discoverReferencedOutputs", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, } end |
.sequence(steps) ⇒ Array<AWSCDK::Pipelines::Step>
Define a sequence of steps to be executed in order.
If you need more fine-grained step ordering, use the add_step_dependency()
API. For example, if you want second_step to occur after first_step, call
secondStep.addStepDependency(firstStep).
45 46 47 48 |
# File 'pipelines/step.rb', line 45 def self.sequence(steps) Jsii::Type.check_type(steps, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLnBpcGVsaW5lcy5TdGVwIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "steps") Jsii::Kernel.instance.call_static("aws-cdk-lib.pipelines.Step", "sequence", [steps]) end |
Instance Method Details
#add_dependency_file_set(fs) ⇒ void
This method returns an undefined value.
Add an additional FileSet to the set of file sets required by this step.
This will lead to a dependency on the producer of that file set.
103 104 105 106 |
# File 'pipelines/step.rb', line 103 def add_dependency_file_set(fs) Jsii::Type.check_type(fs, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5waXBlbGluZXMuRmlsZVNldCJ9")), "fs") jsii_call_method("addDependencyFileSet", [fs]) end |
#add_step_dependency(step) ⇒ void
This method returns an undefined value.
Add a dependency on another step.
112 113 114 115 |
# File 'pipelines/step.rb', line 112 def add_step_dependency(step) Jsii::Type.check_type(step, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5waXBlbGluZXMuU3RlcCJ9")), "step") jsii_call_method("addStepDependency", [step]) end |
#configure_primary_output(fs) ⇒ void
This method returns an undefined value.
Configure the given FileSet as the primary output of this step.
121 122 123 124 |
# File 'pipelines/step.rb', line 121 def configure_primary_output(fs) Jsii::Type.check_type(fs, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5waXBlbGluZXMuRmlsZVNldCJ9")), "fs") jsii_call_method("configurePrimaryOutput", [fs]) end |
#consumed_stack_outputs ⇒ Array<AWSCDK::Pipelines::StackOutputReference>
StackOutputReferences this step consumes.
53 54 55 |
# File 'pipelines/step.rb', line 53 def consumed_stack_outputs() jsii_get_property("consumedStackOutputs") end |
#dependencies ⇒ Array<AWSCDK::Pipelines::Step>
Return the steps this step depends on, based on the FileSets it requires.
60 61 62 |
# File 'pipelines/step.rb', line 60 def dependencies() jsii_get_property("dependencies") end |
#dependency_file_sets ⇒ Array<AWSCDK::Pipelines::FileSet>
The list of FileSets consumed by this Step.
67 68 69 |
# File 'pipelines/step.rb', line 67 def dependency_file_sets() jsii_get_property("dependencyFileSets") end |
#discover_referenced_outputs(structure) ⇒ void
This method returns an undefined value.
Crawl the given structure for references to StepOutputs and add dependencies on all steps found.
Should be called in the constructor of subclasses based on what the user passes in as construction properties. The format of the structure passed in here does not have to correspond exactly to what gets rendered into the engine, it just needs to contain the same data.
135 136 137 138 |
# File 'pipelines/step.rb', line 135 def discover_referenced_outputs(structure) Jsii::Type.check_type(structure, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "structure") jsii_call_method("discoverReferencedOutputs", [structure]) end |
#id ⇒ String
Identifier for this step.
74 75 76 |
# File 'pipelines/step.rb', line 74 def id() jsii_get_property("id") end |
#is_source ⇒ Boolean
Whether or not this is a Source step.
What it means to be a Source step depends on the engine.
83 84 85 |
# File 'pipelines/step.rb', line 83 def is_source() jsii_get_property("isSource") end |
#primary_output ⇒ AWSCDK::Pipelines::FileSet?
The primary FileSet produced by this Step.
Not all steps produce an output FileSet--if they do
you can substitute the Step object for the FileSet object.
93 94 95 |
# File 'pipelines/step.rb', line 93 def primary_output() jsii_get_property("primaryOutput") end |
#to_string ⇒ String
Return a string representation of this Step.
143 144 145 |
# File 'pipelines/step.rb', line 143 def to_string() jsii_call_method("toString", []) end |