prima-twig 0.31.53 → 0.31.54
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/twig-feature +1 -1
- data/bin/twig-update-ami +20 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c262be2280c84f31191af9e87cd45177be1ab29
|
4
|
+
data.tar.gz: 06243f4e861fe812731ddc26f12c6973fc88f774
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d54266727a239f145a442d9210760ed69e6a5397630dc96af1d276aaa2d2f3b4987efe8ce61ac7998967948a886a7ba15011fde44d9850e020c985dcf6eea7c
|
7
|
+
data.tar.gz: 1a136911820beda715f1f54be5378bda91d7cff3ba7842eb6289bccb34d3467b0f47a6e495ae6319709415d87b102e3ac5138693d592bdbd4ba428d60ce65ccf
|
data/bin/twig-feature
CHANGED
@@ -26,7 +26,7 @@ class Release
|
|
26
26
|
@asg = Aws::AutoScaling::Client.new
|
27
27
|
@s3_bucket = 'prima-artifacts'
|
28
28
|
@artifact_path = '/tmp/prima-artifact.zip'
|
29
|
-
@import_db_task = 'arn:aws:ecs:eu-west-1:001575623345:task-definition/ecs-task-db-
|
29
|
+
@import_db_task = 'arn:aws:ecs:eu-west-1:001575623345:task-definition/ecs-task-db-restore2-TaskDefinitionDbRestore-1NKCQ2WEKOGK5:1'
|
30
30
|
@dns_record_identifier = nil
|
31
31
|
@ecs_cluster_name = nil
|
32
32
|
@deploy_update = false
|
data/bin/twig-update-ami
CHANGED
@@ -19,13 +19,21 @@ class TwigUpdateAmi
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def execute!(args)
|
22
|
-
|
22
|
+
if args[3] == 'staging'
|
23
|
+
update_amis args[0], args[1], args[2], true
|
24
|
+
else
|
25
|
+
update_amis args[0], args[1], args[2], false
|
26
|
+
end
|
23
27
|
end
|
24
28
|
|
25
29
|
private
|
26
30
|
|
27
|
-
def update_amis(ami_id, ami_name, ami_description)
|
31
|
+
def update_amis(ami_id, ami_name, ami_description, only_staging)
|
28
32
|
@instances['amis'].each do |ami|
|
33
|
+
if only_staging and ami['json'] != 'ecs.json'
|
34
|
+
output "skipping #{ami['json']} because only_staging enabled".yellow
|
35
|
+
next
|
36
|
+
end
|
29
37
|
output 'updating instance definition'.light_green
|
30
38
|
Dir.chdir 'ami'
|
31
39
|
update_instance_name(ami_id, ami_name, ami_description, ami['json'])
|
@@ -34,6 +42,10 @@ class TwigUpdateAmi
|
|
34
42
|
Dir.chdir '..'
|
35
43
|
output 'new ami id: ' + new_ami_id
|
36
44
|
ami['stacks'].each do |stack|
|
45
|
+
if only_staging and not stack['stack_name'].include?('allinone-staging')
|
46
|
+
output "skipping #{stack['stack_name']} because only_staging enabled".yellow
|
47
|
+
next
|
48
|
+
end
|
37
49
|
output 'updating ' + stack['yaml_filename'] + ' and copying onto s3'
|
38
50
|
update_yml_files(new_ami_id, stack['yaml_filename'])
|
39
51
|
copy_yml_files_to_s3(stack['yaml_filename'], stack['s3_key'])
|
@@ -42,12 +54,16 @@ class TwigUpdateAmi
|
|
42
54
|
update_stack_url(stack['stack_name'], stack['template_url'], get_stack_parameters(stack['stack_name']))
|
43
55
|
end
|
44
56
|
end
|
45
|
-
unless ami['batch_compute_environments'].nil?
|
57
|
+
unless ami['batch_compute_environments'].nil? or only_staging
|
46
58
|
ami['batch_compute_environments'].each do |ce|
|
47
59
|
update_batch_compute_environment(ce, new_ami_id)
|
48
60
|
end
|
49
61
|
end
|
50
62
|
ami['stacks'].each do |stack|
|
63
|
+
if only_staging and not stack['stack_name'].include?('allinone-staging')
|
64
|
+
output "skipping #{stack['stack_name']} because only_staging enabled".yellow
|
65
|
+
next
|
66
|
+
end
|
51
67
|
if stack['stack_name'] and stack_exists?(stack['stack_name'])
|
52
68
|
wait_for_stack_ready(stack['stack_name'], ['CREATE_FAILED', 'ROLLBACK_IN_PROGRESS', 'ROLLBACK_FAILED', 'DELETE_IN_PROGRESS', 'DELETE_FAILED', 'DELETE_COMPLETE', 'UPDATE_ROLLBACK_FAILED', 'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS', 'UPDATE_ROLLBACK_COMPLETE', 'ROLLBACK_COMPLETE'])
|
53
69
|
end
|
@@ -115,7 +131,7 @@ class TwigUpdateAmi
|
|
115
131
|
file_content = File.read stack['yaml_filename']
|
116
132
|
file_content.gsub!(/(\w+:\s+)!(\w+)/i, '\1QuaCeraUnPuntoEsclamativo\2')
|
117
133
|
file_content_original = file_content.clone
|
118
|
-
old_ce_name = file_content[/#{stack['label']}[0-9]
|
134
|
+
old_ce_name = file_content[/#{stack['label']}[0-9]*/]
|
119
135
|
new_ce_version = old_ce_name.sub(stack['label'], '').to_i + 1
|
120
136
|
new_ce_name = stack['label'] + new_ce_version.to_s
|
121
137
|
file_content.gsub!(old_ce_name, new_ce_name)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prima-twig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.31.
|
4
|
+
version: 0.31.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matteo Giachino
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2018-02-
|
16
|
+
date: 2018-02-20 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: aws-sdk
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
version: '0'
|
215
215
|
requirements: []
|
216
216
|
rubyforge_project:
|
217
|
-
rubygems_version: 2.6.
|
217
|
+
rubygems_version: 2.6.12
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
220
|
summary: The Prima twig toolbelt
|