Class: AWSCDK::Pipelines::StageDeployment

Inherits:
Jsii::Object
  • Object
show all
Defined in:
pipelines/stage_deployment.rb

Overview

Deployment of a single Stage.

A Stage consists of one or more Stacks, which will be deployed in dependency order.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ StageDeployment

Returns a new instance of StageDeployment.

Raises:

  • (NoMethodError)


11
12
13
# File 'pipelines/stage_deployment.rb', line 11

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.pipelines.StageDeployment does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.from_stage(stage, props = nil) ⇒ AWSCDK::Pipelines::StageDeployment

Create a new StageDeployment from a Stage.

Synthesizes the target stage, and deployes the stacks found inside in dependency order.

Parameters:

Returns:

  • (AWSCDK::Pipelines::StageDeployment)


36
37
38
39
40
41
# File 'pipelines/stage_deployment.rb', line 36

def self.from_stage(stage, props = nil)
  Jsii::Type.check_type(stage, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TdGFnZSJ9")), "stage")
  props = props.is_a?(Hash) ? ::AWSCDK::Pipelines::StageDeploymentProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5waXBlbGluZXMuU3RhZ2VEZXBsb3ltZW50UHJvcHMifQ==")), "props") unless props.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.pipelines.StageDeployment", "fromStage", [stage, props])
end

.jsii_overridable_methodsObject



15
16
17
18
19
20
21
22
23
24
25
26
# File 'pipelines/stage_deployment.rb', line 15

def self.jsii_overridable_methods
  {
    :post => { kind: :property, name: "post", is_optional: false },
    :pre => { kind: :property, name: "pre", is_optional: false },
    :stacks => { kind: :property, name: "stacks", is_optional: false },
    :stack_steps => { kind: :property, name: "stackSteps", is_optional: false },
    :stage_name => { kind: :property, name: "stageName", is_optional: false },
    :prepare_step => { kind: :property, name: "prepareStep", is_optional: true },
    :add_post => { kind: :method, name: "addPost", is_optional: false },
    :add_pre => { kind: :method, name: "addPre", is_optional: false },
  }
end

Instance Method Details

#add_post(*steps) ⇒ void

This method returns an undefined value.

Add an additional step to run after all of the stacks in this stage.

Parameters:



89
90
91
92
93
94
# File 'pipelines/stage_deployment.rb', line 89

def add_post(*steps)
  steps.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5waXBlbGluZXMuU3RlcCJ9")), "steps[#{index}]")
  end
  jsii_call_method("addPost", [*steps])
end

#add_pre(*steps) ⇒ void

This method returns an undefined value.

Add an additional step to run before any of the stacks in this stage.

Parameters:



100
101
102
103
104
105
# File 'pipelines/stage_deployment.rb', line 100

def add_pre(*steps)
  steps.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5waXBlbGluZXMuU3RlcCJ9")), "steps[#{index}]")
  end
  jsii_call_method("addPre", [*steps])
end

#postArray<AWSCDK::Pipelines::Step>

Additional steps that are run after all of the stacks in the stage.

Returns:



46
47
48
# File 'pipelines/stage_deployment.rb', line 46

def post()
  jsii_get_property("post")
end

#preArray<AWSCDK::Pipelines::Step>

Additional steps that are run before any of the stacks in the stage.

Returns:



53
54
55
# File 'pipelines/stage_deployment.rb', line 53

def pre()
  jsii_get_property("pre")
end

#prepare_stepBoolean?

Determine if all stacks in stage should be deployed with prepare step or not.

Returns:

  • (Boolean, nil)


81
82
83
# File 'pipelines/stage_deployment.rb', line 81

def prepare_step()
  jsii_get_property("prepareStep")
end

#stack_stepsArray<AWSCDK::Pipelines::StackSteps>

Instructions for additional steps that are run at stack level.

Returns:



67
68
69
# File 'pipelines/stage_deployment.rb', line 67

def stack_steps()
  jsii_get_property("stackSteps")
end

#stacksArray<AWSCDK::Pipelines::StackDeployment>

The stacks deployed in this stage.



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

def stacks()
  jsii_get_property("stacks")
end

#stage_nameString

The display name of this stage.

Returns:

  • (String)


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

def stage_name()
  jsii_get_property("stageName")
end