Class: AWSCDK::Pipelines::CodePipeline
- Inherits:
-
PipelineBase
- Object
- PipelineBase
- AWSCDK::Pipelines::CodePipeline
- Defined in:
- pipelines/code_pipeline.rb
Overview
A CDK Pipeline that uses CodePipeline to deploy CDK apps.
This is a Pipeline with its engine property set to
CodePipelineEngine, and exists for nicer ergonomics for
users that don't need to switch out engines.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_stage(stage, options = nil) ⇒ AWSCDK::Pipelines::StageDeployment
Deploy a single Stage by itself.
-
#add_wave(id, options = nil) ⇒ AWSCDK::Pipelines::Wave
Add a Wave to the pipeline, for deploying multiple Stages in parallel.
-
#build_pipeline ⇒ void
Send the current pipeline definition to the engine, and construct the pipeline.
-
#cloud_assembly_file_set ⇒ AWSCDK::Pipelines::FileSet
The FileSet tha contains the cloud assembly.
-
#do_build_pipeline ⇒ void
Implemented by subclasses to do the actual pipeline construction.
-
#initialize(scope, id, props) ⇒ CodePipeline
constructor
A new instance of CodePipeline.
-
#node ⇒ Constructs::Node
The tree node.
-
#pipeline ⇒ AWSCDK::Codepipeline::Pipeline
The CodePipeline pipeline that deploys the CDK app.
-
#self_mutation_enabled ⇒ Boolean
Whether SelfMutation is enabled for this CDK Pipeline.
-
#self_mutation_project ⇒ AWSCDK::CodeBuild::IProject
The CodeBuild project that performs the SelfMutation.
-
#synth ⇒ AWSCDK::Pipelines::IFileSetProducer
The build step that produces the CDK Cloud Assembly.
-
#synth_project ⇒ AWSCDK::CodeBuild::IProject
The CodeBuild project that performs the Synth.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#use_pipeline_role_for_actions ⇒ Boolean
Allow pipeline service role used for actions if no action role configured instead of creating a new role for each action.
-
#waves ⇒ Array<AWSCDK::Pipelines::Wave>
The waves in this pipeline.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ CodePipeline
Returns a new instance of CodePipeline.
15 16 17 18 19 20 21 |
# File 'pipelines/code_pipeline.rb', line 15 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::Pipelines::CodePipelineProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5waXBlbGluZXMuQ29kZVBpcGVsaW5lUHJvcHMifQ==")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'pipelines/code_pipeline.rb', line 23 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :cloud_assembly_file_set => { kind: :property, name: "cloudAssemblyFileSet", is_optional: false }, :synth => { kind: :property, name: "synth", is_optional: false }, :waves => { kind: :property, name: "waves", is_optional: false }, :pipeline => { kind: :property, name: "pipeline", is_optional: false }, :self_mutation_enabled => { kind: :property, name: "selfMutationEnabled", is_optional: false }, :self_mutation_project => { kind: :property, name: "selfMutationProject", is_optional: false }, :synth_project => { kind: :property, name: "synthProject", is_optional: false }, :use_pipeline_role_for_actions => { kind: :property, name: "usePipelineRoleForActions", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :add_stage => { kind: :method, name: "addStage", is_optional: false }, :add_wave => { kind: :method, name: "addWave", is_optional: false }, :build_pipeline => { kind: :method, name: "buildPipeline", is_optional: false }, :do_build_pipeline => { kind: :method, name: "doBuildPipeline", is_optional: false }, } end |
Instance Method Details
#add_stage(stage, options = nil) ⇒ AWSCDK::Pipelines::StageDeployment
Deploy a single Stage by itself.
Add a Stage to the pipeline, to be deployed in sequence with other Stages added to the pipeline. All Stacks in the stage will be deployed in an order automatically determined by their relative dependencies.
147 148 149 150 151 152 |
# File 'pipelines/code_pipeline.rb', line 147 def add_stage(stage, = nil) Jsii::Type.check_type(stage, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TdGFnZSJ9")), "stage") = .is_a?(Hash) ? ::AWSCDK::Pipelines::AddStageOpts.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5waXBlbGluZXMuQWRkU3RhZ2VPcHRzIn0=")), "options") unless .nil? jsii_call_method("addStage", [stage, ]) end |
#add_wave(id, options = nil) ⇒ AWSCDK::Pipelines::Wave
Add a Wave to the pipeline, for deploying multiple Stages in parallel.
Use the return object of this method to deploy multiple stages in parallel.
Example:
# Example automatically generated from non-compiling source. May contain errors.
pipeline = nil
wave = pipeline.add_wave("MyWave")
wave.add_stage(MyApplicationStage.new(self, "Stage1"))
wave.add_stage(MyApplicationStage.new(self, "Stage2"))
172 173 174 175 176 177 |
# File 'pipelines/code_pipeline.rb', line 172 def add_wave(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Pipelines::WaveOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5waXBlbGluZXMuV2F2ZU9wdGlvbnMifQ==")), "options") unless .nil? jsii_call_method("addWave", [id, ]) end |
#build_pipeline ⇒ void
This method returns an undefined value.
Send the current pipeline definition to the engine, and construct the pipeline.
It is not possible to modify the pipeline after calling this method.
184 185 186 |
# File 'pipelines/code_pipeline.rb', line 184 def build_pipeline() jsii_call_method("buildPipeline", []) end |
#cloud_assembly_file_set ⇒ AWSCDK::Pipelines::FileSet
The FileSet tha contains the cloud assembly.
This is the primary output of the synth step.
55 56 57 |
# File 'pipelines/code_pipeline.rb', line 55 def cloud_assembly_file_set() jsii_get_property("cloudAssemblyFileSet") end |
#do_build_pipeline ⇒ void
This method returns an undefined value.
Implemented by subclasses to do the actual pipeline construction.
191 192 193 |
# File 'pipelines/code_pipeline.rb', line 191 def do_build_pipeline() jsii_call_method("doBuildPipeline", []) end |
#node ⇒ Constructs::Node
The tree node.
46 47 48 |
# File 'pipelines/code_pipeline.rb', line 46 def node() jsii_get_property("node") end |
#pipeline ⇒ AWSCDK::Codepipeline::Pipeline
The CodePipeline pipeline that deploys the CDK app.
Only available after the pipeline has been built.
78 79 80 |
# File 'pipelines/code_pipeline.rb', line 78 def pipeline() jsii_get_property("pipeline") end |
#self_mutation_enabled ⇒ Boolean
Whether SelfMutation is enabled for this CDK Pipeline.
85 86 87 |
# File 'pipelines/code_pipeline.rb', line 85 def self_mutation_enabled() jsii_get_property("selfMutationEnabled") end |
#self_mutation_project ⇒ AWSCDK::CodeBuild::IProject
The CodeBuild project that performs the SelfMutation.
Will throw an error if this is accessed before build_pipeline()
is called, or if selfMutation has been disabled.
95 96 97 |
# File 'pipelines/code_pipeline.rb', line 95 def self_mutation_project() jsii_get_property("selfMutationProject") end |
#synth ⇒ AWSCDK::Pipelines::IFileSetProducer
The build step that produces the CDK Cloud Assembly.
62 63 64 |
# File 'pipelines/code_pipeline.rb', line 62 def synth() jsii_get_property("synth") end |
#synth_project ⇒ AWSCDK::CodeBuild::IProject
The CodeBuild project that performs the Synth.
Only available after the pipeline has been built.
104 105 106 |
# File 'pipelines/code_pipeline.rb', line 104 def synth_project() jsii_get_property("synthProject") end |
#to_string ⇒ String
Returns a string representation of this construct.
118 119 120 |
# File 'pipelines/code_pipeline.rb', line 118 def to_string() jsii_call_method("toString", []) end |
#use_pipeline_role_for_actions ⇒ Boolean
Allow pipeline service role used for actions if no action role configured instead of creating a new role for each action.
111 112 113 |
# File 'pipelines/code_pipeline.rb', line 111 def use_pipeline_role_for_actions() jsii_get_property("usePipelineRoleForActions") end |
#waves ⇒ Array<AWSCDK::Pipelines::Wave>
The waves in this pipeline.
69 70 71 |
# File 'pipelines/code_pipeline.rb', line 69 def waves() jsii_get_property("waves") end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
131 132 133 134 135 136 |
# File 'pipelines/code_pipeline.rb', line 131 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |