Class: Aws::RailsProvisioner::CDKDeployer
- Inherits:
-
Object
- Object
- Aws::RailsProvisioner::CDKDeployer
- Defined in:
- lib/aws-rails-provisioner/cdk_deployer.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ CDKDeployer
constructor
A new instance of CDKDeployer.
- #run ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ CDKDeployer
Returns a new instance of CDKDeployer.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/aws-rails-provisioner/cdk_deployer.rb', line 6 def initialize( = {}) @cdk_dir = [:cdk_dir] @services = [:services] @stack_prefix = [:stack_prefix] both = [:fargate].nil? && [:cicd].nil? @fargate_stack = both || !![:fargate] @pipeline_stack = both || !![:cicd] @init_stack_only = !![:init] @svc_name = [:service_name] @profile = [:profile] end |
Instance Method Details
#run ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/aws-rails-provisioner/cdk_deployer.rb', line 21 def run Dir.chdir(@cdk_dir) do `cdk bootstrap` deploy_init_stack unless @init_stack_only if @svc_name deploy_svc(@services[@svc_name].stack_prefix) else @services.each do |svc| deploy_svc(svc.stack_prefix) end end end end end |