Class: AWSCDK::Pipelines::Step

Inherits:
Jsii::Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Step

Returns a new instance of Step.

Parameters:

  • id (String)

    Identifier for this 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_methodsObject



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

Parameters:

  • steps (Array<AWSCDK::Pipelines::Step>)

Returns:

  • (Array<AWSCDK::Pipelines::Step>)


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.

Parameters:



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.

Parameters:

  • step (AWSCDK::Pipelines::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.

Parameters:



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

#dependenciesArray<AWSCDK::Pipelines::Step>

Return the steps this step depends on, based on the FileSets it requires.

Returns:

  • (Array<AWSCDK::Pipelines::Step>)


60
61
62
# File 'pipelines/step.rb', line 60

def dependencies()
  jsii_get_property("dependencies")
end

#dependency_file_setsArray<AWSCDK::Pipelines::FileSet>

The list of FileSets consumed by this Step.

Returns:



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.

Parameters:

  • structure (Object)


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

#idString

Identifier for this step.

Returns:

  • (String)


74
75
76
# File 'pipelines/step.rb', line 74

def id()
  jsii_get_property("id")
end

#is_sourceBoolean

Whether or not this is a Source step.

What it means to be a Source step depends on the engine.

Returns:

  • (Boolean)


83
84
85
# File 'pipelines/step.rb', line 83

def is_source()
  jsii_get_property("isSource")
end

#primary_outputAWSCDK::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.

Returns:



93
94
95
# File 'pipelines/step.rb', line 93

def primary_output()
  jsii_get_property("primaryOutput")
end

#to_stringString

Return a string representation of this Step.

Returns:

  • (String)


143
144
145
# File 'pipelines/step.rb', line 143

def to_string()
  jsii_call_method("toString", [])
end