ciinabox-ecs 0.2.2 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 602691115c440d23c67e6765a0860a35f6bb0824
4
- data.tar.gz: 4bdf78250830dc865e5185bfbde985377a5a8d95
3
+ metadata.gz: 9e19ba0dabb22593de7d70d0c146242d04aee642
4
+ data.tar.gz: 66172b230241522c4b851b84481dc2d34503d6c3
5
5
  SHA512:
6
- metadata.gz: 6cece34d071f2f6798545ad7410926bbadf19b390f3833e46b6dc0452fa55ff8e9af44b2a96e6be0412584239caea2cc8ce8f34ab72ef7aa23b0b29daf2e4608
7
- data.tar.gz: b883427bce1dc6cc2165f44fa22c5845e12b5150106a15454bea5caaa7be30a896849f9a11cb503743ef1b546173630929672608fd82bc65b74033802bdb71a2
6
+ metadata.gz: 56ed09c4564f1299b6ca17d8d4b18930c25fda2d32b4bd4745afc36551af02fc8a6ee5bcafb783dd3bff911ea7f7b5ac0588a97689a7f8f38eaf29ad3844ded2
7
+ data.tar.gz: c2b7d1cd2dee089cafc0596e5d706652532503a6a1ae3bd61c6cd59c2977266cd76ffa9956e2679022957320587024bc65e0552b453dcbd1e0aa1736771f2f74
data/Rakefile CHANGED
@@ -11,6 +11,8 @@ require 'tempfile'
11
11
  require 'json'
12
12
  require_relative './ext/common_helper'
13
13
  require_relative './ext/zip_helper'
14
+ require 'ciinabox-ecs' if Gem::Specification::find_all_by_name('ciinabox-ecs').any?
15
+
14
16
  namespace :ciinabox do
15
17
 
16
18
  #load config
@@ -44,6 +46,13 @@ namespace :ciinabox do
44
46
  config['lambdas'] = {} unless config.key? 'lambdas'
45
47
  config['lambdas'].extend(config['default_lambdas'])
46
48
 
49
+ # ciinabox binary version
50
+ if Gem.loaded_specs['ciinabox-ecs'].nil?
51
+ config['ciinabox_binary_version'] = `git rev-parse --short HEAD`.gsub("\n",'')
52
+ else
53
+ config['ciinabox_binary_version'] = Gem.loaded_specs['ciinabox-ecs'].version.to_s
54
+ end
55
+
47
56
  File.write('debug-ciinabox.config.yaml',config.to_yaml) if ENV['DEBUG']
48
57
 
49
58
  stack_name = config["stack_name"] || "ciinabox"
data/bin/ciinabox-ecs.rb CHANGED
@@ -18,8 +18,10 @@ class CiinaboxEcsCli
18
18
 
19
19
  actions = app.tasks.map { |t| t.name.gsub('ciinabox:', '') }
20
20
 
21
+ required_args_size = ENV.key?('CIINABOX') ? 1 : 2
22
+
21
23
  if (args.size() ==0) or
22
- (args.size() < 2 and (not %w(init full_install).include? args[0])) or
24
+ (args.size() < required_args_size and (not %w(init full_install).include? args[0])) or
23
25
  (args[0] == 'help') or
24
26
  (not actions.include? args[0])
25
27
  STDERR.puts("Usage: ciinabox-ecs action1 action2 action3 ciinabox_name")
@@ -33,9 +35,11 @@ class CiinaboxEcsCli
33
35
  end
34
36
 
35
37
  methods = args[0..args.size()-2]
36
- ciinabox_name = args[args.size()-1]
37
38
 
38
- ENV['CIINABOX'] = ciinabox_name
39
+ unless ENV.key? 'CIINABOX'
40
+ ciinabox_name = args[args.size()-1]
41
+ ENV['CIINABOX'] = ciinabox_name
42
+ end
39
43
 
40
44
  if ENV.key? 'CIINABOXES_DIR'
41
45
  ENV['CIINABOXES_DIR'] = File.expand_path(ENV['CIINABOXES_DIR'])
@@ -0,0 +1,5 @@
1
+ module CiinaboxEcs
2
+
3
+
4
+
5
+ end
@@ -1,10 +1,11 @@
1
1
  require_relative '../ext/policies'
2
-
3
2
  CloudFormation do
4
3
 
4
+ ciinabox_binary_version = config['ciinabox_binary_version']
5
+
5
6
  # Template metadata
6
7
  AWSTemplateFormatVersion '2010-09-09'
7
- Description "ciinabox ECS #{Gem.latest_spec_for('ciinabox-ecs').version.to_s} - v#{ciinabox_version}"
8
+ Description "ciinabox ECS #{ciinabox_binary_version} - v#{ciinabox_version}"
8
9
 
9
10
  Resource(cluster_name) {
10
11
  Type 'AWS::ECS::Cluster'
@@ -156,4 +157,12 @@ CloudFormation do
156
157
  Value(FnGetAtt('ECSServicesStack','Outputs.DefaultSSLCertificate'))
157
158
  }
158
159
 
160
+ Output('CiinaboxBinaryVersion'){
161
+ Value(ciinabox_binary_version)
162
+ }
163
+
164
+ Output('CiinaboxName'){
165
+ Value(ciinabox_name)
166
+ }
167
+
159
168
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ciinabox-ecs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Base2Services
@@ -106,6 +106,7 @@ files:
106
106
  - ext/zip_helper.rb
107
107
  - lambdas/acm_issuer_validator/install.sh
108
108
  - lambdas/acm_issuer_validator/lib/install.sh
109
+ - lib/ciinabox-ecs.rb
109
110
  - templates/bastion.rb
110
111
  - templates/ciinabox.rb
111
112
  - templates/ecs-cluster.rb