prima-twig 0.32.1 → 0.33.0
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 +48 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 043d90550297bbd6474f7083330199622ae5322c
|
4
|
+
data.tar.gz: 3dc8e2685e0e06e4e8753e7fcd9f0b54e3cb8626
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b863828556a1ebd5bd157ff95b95f17418ddec6f4b72fc2cfa0572e466f659ee9133d2f5b70ac1a2c48aed6dc8d21361933304e66589bf6acddfe09f457a7d66
|
7
|
+
data.tar.gz: 7640d8cd2afa9dbe5eb88157978b15e55aa701306fd924fec438c6565d440a6e6a772e9d861c41c904ccb523071d546c25ab6ffe89cc0ee09a29c8d04c7b4ce3
|
data/bin/twig-feature
CHANGED
@@ -60,6 +60,8 @@ class Release
|
|
60
60
|
deploy_shutdown!
|
61
61
|
elsif 'update' == args[1]
|
62
62
|
deploy_update!
|
63
|
+
elsif 'lock' == args[1]
|
64
|
+
deploy_lock!
|
63
65
|
else
|
64
66
|
if args[1]
|
65
67
|
select_branches(args[1])
|
@@ -313,6 +315,46 @@ class Release
|
|
313
315
|
output "Finito!".green
|
314
316
|
end
|
315
317
|
|
318
|
+
def deploy_lock!
|
319
|
+
output "Deploy update menu"
|
320
|
+
`git pull && git submodule init && git submodule update`
|
321
|
+
|
322
|
+
@deploy_update = true
|
323
|
+
|
324
|
+
output "Recupero le informazioni sui QA attivi..."
|
325
|
+
stack_list, envs = get_stacks()
|
326
|
+
|
327
|
+
env_hash = nil
|
328
|
+
unless envs.empty?
|
329
|
+
env_hash = choose do |menu|
|
330
|
+
menu.prompt = "Scegli il QA che vuoi proteggere dallo spegnimento automatico: ".cyan
|
331
|
+
menu.shell = true
|
332
|
+
envs.each do |key, env|
|
333
|
+
title = ""
|
334
|
+
env.each do |e|
|
335
|
+
title << "\n#{e.key.upcase}: #{e.value}"
|
336
|
+
end
|
337
|
+
msg = "#{@prima.reduce_size(title, 1000)}".light_blue
|
338
|
+
menu.choice(msg) { key }
|
339
|
+
end
|
340
|
+
end
|
341
|
+
else
|
342
|
+
output "Nessun QA trovato".red
|
343
|
+
exit
|
344
|
+
end
|
345
|
+
|
346
|
+
cluster_stack_name = "ecs-cluster-#{env_hash}"
|
347
|
+
if stack_exists?(cluster_stack_name)
|
348
|
+
tags = get_stack_tags(cluster_stack_name)
|
349
|
+
tag_keep_data = Aws::CloudFormation::Types::Tag.new({key:'AUTOMATIC_DELETION_PROTECTION', value:'true'})
|
350
|
+
tags.push tag_keep_data
|
351
|
+
end
|
352
|
+
|
353
|
+
update_cluster_stack(cluster_stack_name, tags)
|
354
|
+
|
355
|
+
output "Finito!".green
|
356
|
+
end
|
357
|
+
|
316
358
|
def deploy_update!
|
317
359
|
output "Deploy update menu"
|
318
360
|
`git pull && git submodule init && git submodule update`
|
@@ -1709,6 +1751,11 @@ class Release
|
|
1709
1751
|
create_stack(stack_name, stack_body, [], tags)
|
1710
1752
|
end
|
1711
1753
|
|
1754
|
+
def update_cluster_stack(stack_name, tags = [])
|
1755
|
+
stack_body = IO.read('cloudformation/stacks/ecs-cluster.yml')
|
1756
|
+
update_stack(stack_name, stack_body, [], tags)
|
1757
|
+
end
|
1758
|
+
|
1712
1759
|
def create_alb_stack(stack_name, role)
|
1713
1760
|
stack_body = IO.read('cloudformation/stacks/alb/ecs-alb-public.yml')
|
1714
1761
|
parameters = [
|
@@ -1983,6 +2030,7 @@ Description
|
|
1983
2030
|
deploy deploys the feature branch to a temporary AWS Elastic Beanstalk env
|
1984
2031
|
deploy stop destroys the AWS Elastic Beanstalk env
|
1985
2032
|
deploy update updates a feature branch with current branches
|
2033
|
+
deploy lock protects a qa environment from automatic deletion
|
1986
2034
|
aggregator enable/disable directs comparator's staging environments to a qa/staging
|
1987
2035
|
|
1988
2036
|
Subcommand for Twig: <http://rondevera.github.io/twig/>
|
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.
|
4
|
+
version: 0.33.0
|
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-03-
|
16
|
+
date: 2018-03-27 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: aws-sdk
|