Class: AWSCDK::Pipelines::StageDeployment
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Pipelines::StageDeployment
- 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
-
.from_stage(stage, props = nil) ⇒ AWSCDK::Pipelines::StageDeployment
Create a new
StageDeploymentfrom aStage. - .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#add_post(*steps) ⇒ void
Add an additional step to run after all of the stacks in this stage.
-
#add_pre(*steps) ⇒ void
Add an additional step to run before any of the stacks in this stage.
-
#initialize(*args) ⇒ StageDeployment
constructor
A new instance of StageDeployment.
-
#post ⇒ Array<AWSCDK::Pipelines::Step>
Additional steps that are run after all of the stacks in the stage.
-
#pre ⇒ Array<AWSCDK::Pipelines::Step>
Additional steps that are run before any of the stacks in the stage.
-
#prepare_step ⇒ Boolean?
Determine if all stacks in stage should be deployed with prepare step or not.
-
#stack_steps ⇒ Array<AWSCDK::Pipelines::StackSteps>
Instructions for additional steps that are run at stack level.
-
#stacks ⇒ Array<AWSCDK::Pipelines::StackDeployment>
The stacks deployed in this stage.
-
#stage_name ⇒ String
The display name of this stage.
Constructor Details
#initialize(*args) ⇒ StageDeployment
Returns a new instance of StageDeployment.
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.
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_methods ⇒ Object
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.
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.
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 |
#post ⇒ Array<AWSCDK::Pipelines::Step>
Additional steps that are run after all of the stacks in the stage.
46 47 48 |
# File 'pipelines/stage_deployment.rb', line 46 def post() jsii_get_property("post") end |
#pre ⇒ Array<AWSCDK::Pipelines::Step>
Additional steps that are run before any of the stacks in the stage.
53 54 55 |
# File 'pipelines/stage_deployment.rb', line 53 def pre() jsii_get_property("pre") end |
#prepare_step ⇒ Boolean?
Determine if all stacks in stage should be deployed with prepare step or not.
81 82 83 |
# File 'pipelines/stage_deployment.rb', line 81 def prepare_step() jsii_get_property("prepareStep") end |
#stack_steps ⇒ Array<AWSCDK::Pipelines::StackSteps>
Instructions for additional steps that are run at stack level.
67 68 69 |
# File 'pipelines/stage_deployment.rb', line 67 def stack_steps() jsii_get_property("stackSteps") end |
#stacks ⇒ Array<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_name ⇒ String
The display name of this stage.
74 75 76 |
# File 'pipelines/stage_deployment.rb', line 74 def stage_name() jsii_get_property("stageName") end |