prima-twig 0.55.3 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/twig-feature +266 -171
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d91cd82652d13109a795d631b86f83b54321ca1d84d7fcaced87feea19814bcc
|
4
|
+
data.tar.gz: fc87c205e48ac251243512ce0dc49edff923e01b0accea294785ebfa7260bbd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 377b5b905f79bfa1f334bc3b96fdd020ac603bd3b41321252c1bb101d5eb841600f620c445cf900fab3dacb513bbaea1c5fca735e0976e1ecc31e1049749acbb
|
7
|
+
data.tar.gz: eb2f05fe4b7cc4f28783ca59213511d0cf753e594c8e4156c134f9acb0415db52e587f3dcfafd43e2f249d614356d892fff950a1d69c59e14450b90b45b75274
|
data/bin/twig-feature
CHANGED
@@ -58,7 +58,8 @@ class Release
|
|
58
58
|
'leftorium' => {},
|
59
59
|
'pyxis-npm' => {},
|
60
60
|
'starsky' => {},
|
61
|
-
'hutch' => {}
|
61
|
+
'hutch' => {},
|
62
|
+
'maia' => {}
|
62
63
|
}
|
63
64
|
@base_stack_name_alb = 'ecs-alb-http-public-qa-'
|
64
65
|
@base_stack_name_alb_ws = 'ecs-alb-ws-public-qa-'
|
@@ -439,13 +440,13 @@ class Release
|
|
439
440
|
end
|
440
441
|
|
441
442
|
def get_default_branch_name(projects)
|
442
|
-
if !projects['prima'][
|
443
|
-
return projects['prima'][
|
444
|
-
elsif ![nil, 'master'].include? projects['crash'][
|
445
|
-
return projects['crash'][
|
443
|
+
if !projects['prima']['default_branch']
|
444
|
+
return projects['prima']['name']
|
445
|
+
elsif ![nil, 'master'].include? projects['crash']['name']
|
446
|
+
return projects['crash']['name']
|
446
447
|
else
|
447
448
|
projects.each_key do |project_key|
|
448
|
-
return projects[project_key][
|
449
|
+
return projects[project_key]['name'] if projects[project_key]['name'] != 'master'
|
449
450
|
end
|
450
451
|
end
|
451
452
|
end
|
@@ -488,16 +489,9 @@ class Release
|
|
488
489
|
`git checkout -b #{branch_name}`
|
489
490
|
end
|
490
491
|
|
491
|
-
branches = ''
|
492
492
|
@git_branch = branch_name
|
493
493
|
|
494
|
-
|
495
|
-
if @projects[project_key][:revision]
|
496
|
-
branches += "#{project_key}:#{@projects[project_key][:name]}:#{@projects[project_key][:revision]}:#{@projects[project_key][:default_branch]}\n"
|
497
|
-
end
|
498
|
-
end
|
499
|
-
|
500
|
-
File.open('branch_names', 'w') { |file| file.write(branches) }
|
494
|
+
File.open('branch_names', 'w') { |file| file.write(JSON.generate(@projects)) }
|
501
495
|
|
502
496
|
`git add projects && \
|
503
497
|
git add branch_names && \
|
@@ -524,9 +518,9 @@ class Release
|
|
524
518
|
end
|
525
519
|
|
526
520
|
# così recupero le informazioni sul branch, poi vado a scrivere il file branch_names con una sola riga
|
527
|
-
branch =
|
521
|
+
branch = {'project' => { 'name' => project_definition[:name], 'revision' => project_definition[:revision], 'default_branch' => project_definition[:default_branch]}}
|
528
522
|
|
529
|
-
File.open('branch_names', 'w') { |file| file.write(branch) }
|
523
|
+
File.open('branch_names', 'w') { |file| file.write(JSON.generate(branch)) }
|
530
524
|
|
531
525
|
`git add projects && \
|
532
526
|
git add branch_names && \
|
@@ -559,23 +553,19 @@ class Release
|
|
559
553
|
# aggiornare il commit (revision a cui fa riferimento)
|
560
554
|
|
561
555
|
# leggo il file branch_names / recupero i nomi dei branch / riscrivo tutto
|
556
|
+
projects = ''
|
562
557
|
File.open('branch_names', 'r') do |file|
|
563
558
|
file.each_line do |line|
|
564
|
-
|
565
|
-
@projects[project[0]] = select_branch_to_deploy(project[0], project[1])
|
566
|
-
@projects[project[0]][:default_branch] = project[3]
|
559
|
+
projects = JSON.parse(line)
|
567
560
|
end
|
568
561
|
end
|
569
562
|
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
if @projects[project_key][:revision]
|
574
|
-
branches += "#{project_key}:#{@projects[project_key][:name]}:#{@projects[project_key][:revision]}:#{@projects[project_key][:default_branch]}"
|
575
|
-
end
|
563
|
+
projects.each do |key, project|
|
564
|
+
@projects[key] = select_branch_to_deploy(key, project['name'])
|
565
|
+
@projects[key]['default_branch'] = project['default_branch']
|
576
566
|
end
|
577
567
|
|
578
|
-
File.open('branch_names', 'w') { |file| file.write(
|
568
|
+
File.open('branch_names', 'w') { |file| file.write(JSON.generate(@projects)) }
|
579
569
|
|
580
570
|
if `git log -1` =~ /minimal_/
|
581
571
|
`git commit -am 'minimal_update'`
|
@@ -671,16 +661,18 @@ class Release
|
|
671
661
|
end
|
672
662
|
|
673
663
|
def qainit_read_config!(action)
|
664
|
+
projects = ''
|
665
|
+
|
674
666
|
File.open('branch_names', 'r') do |file|
|
675
667
|
file.each_line do |line|
|
676
|
-
|
677
|
-
if project[3] == 'true'
|
678
|
-
@projects[project[0]] = {:name=> project[1], :revision=> project[2], :default_branch=> true}
|
679
|
-
elsif project[3] == 'false'
|
680
|
-
@projects[project[0]] = {:name=> project[1], :revision=> project[2], :default_branch=> false}
|
681
|
-
end
|
668
|
+
projects = JSON.parse(line)
|
682
669
|
end
|
683
670
|
end
|
671
|
+
|
672
|
+
projects.each do |key, project|
|
673
|
+
@projects[key] = project
|
674
|
+
end
|
675
|
+
|
684
676
|
get_s3_config_files
|
685
677
|
@qainit = true
|
686
678
|
case action
|
@@ -721,9 +713,9 @@ class Release
|
|
721
713
|
@ami_id = get_ami_id("ecs-fleet-allinone-staging")
|
722
714
|
project = ''
|
723
715
|
@projects.each_key do |project_key|
|
724
|
-
if @projects[project_key][
|
716
|
+
if @projects[project_key]['revision']
|
725
717
|
project = project_key
|
726
|
-
git_checkout_version(project_key, @projects[project_key][
|
718
|
+
git_checkout_version(project_key, @projects[project_key]['revision'])
|
727
719
|
end
|
728
720
|
end
|
729
721
|
deploy_id = get_deploy_id
|
@@ -738,7 +730,7 @@ class Release
|
|
738
730
|
},
|
739
731
|
{
|
740
732
|
key: project,
|
741
|
-
value: @projects[project][
|
733
|
+
value: @projects[project]['name']
|
742
734
|
},
|
743
735
|
{
|
744
736
|
key: "hostname_pattern_priority",
|
@@ -771,8 +763,8 @@ class Release
|
|
771
763
|
create_asg_stack(asg_stack_name, tags) unless stack_exists?(asg_stack_name)
|
772
764
|
|
773
765
|
deploy_id = get_deploy_id
|
774
|
-
create_pyxis_artifact(@projects["pyxis-npm"][
|
775
|
-
create_prima_artifact(@projects["prima"][
|
766
|
+
create_pyxis_artifact(@projects["pyxis-npm"]['revision'], deploy_id)
|
767
|
+
create_prima_artifact(@projects["prima"]['revision'], @projects["prima"]['name'], deploy_id, true) unless artifact_exists?('prima-artifacts-encrypted', "prima/#{@projects["prima"]['revision']}.tar.gz")
|
776
768
|
|
777
769
|
wait_for_stack_ready(stack_name_alb) unless stack_ready?(stack_name_alb)
|
778
770
|
wait_for_stack_ready(stack_name_alb_ws) unless stack_ready?(stack_name_alb_ws)
|
@@ -798,7 +790,7 @@ class Release
|
|
798
790
|
wait_for_stack_ready(stack_name_route53) unless stack_ready?(stack_name_route53)
|
799
791
|
|
800
792
|
stack_name_web = "ecs-task-web-qa-#{deploy_id}"
|
801
|
-
git_checkout_version('prima', @projects["prima"][
|
793
|
+
git_checkout_version('prima', @projects["prima"]['revision'])
|
802
794
|
stack_body = IO.read('projects/prima/app/cloudformation/tasks/web.yml')
|
803
795
|
parameters = [
|
804
796
|
{
|
@@ -807,7 +799,7 @@ class Release
|
|
807
799
|
},
|
808
800
|
{
|
809
801
|
parameter_key: "ReleaseVersion",
|
810
|
-
parameter_value: "#{@projects["prima"][
|
802
|
+
parameter_value: "#{@projects["prima"]['revision']}"
|
811
803
|
},
|
812
804
|
{
|
813
805
|
parameter_key: "TaskDesiredCount",
|
@@ -864,7 +856,7 @@ class Release
|
|
864
856
|
]
|
865
857
|
if stack_exists?(stack_name_web)
|
866
858
|
cur_version = get_currently_deployed_version(stack_name_web)
|
867
|
-
update_stack(stack_name_web, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["prima"][
|
859
|
+
update_stack(stack_name_web, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["prima"]['revision'])
|
868
860
|
else
|
869
861
|
create_stack(stack_name_web, stack_body, parameters, tags, @cf_role)
|
870
862
|
end
|
@@ -891,8 +883,8 @@ class Release
|
|
891
883
|
stack_name_alb_ws = 'ecs-alb-ws-public-qa-' + deploy_id[0..5]
|
892
884
|
unless @qainit
|
893
885
|
@projects.each_key do |project_key|
|
894
|
-
if @projects[project_key][
|
895
|
-
git_checkout_version(project_key, @projects[project_key][
|
886
|
+
if @projects[project_key]['revision']
|
887
|
+
git_checkout_version(project_key, @projects[project_key]['revision'])
|
896
888
|
end
|
897
889
|
end
|
898
890
|
end
|
@@ -912,11 +904,11 @@ class Release
|
|
912
904
|
@projects.each do |key, value|
|
913
905
|
case key.to_s
|
914
906
|
when 'crash'
|
915
|
-
tags << { key: 'crash', value: @projects['crash'][
|
916
|
-
when 'starsky', 'hutch'
|
917
|
-
tags << { key: key.to_s, value: @projects[key.to_s][
|
907
|
+
tags << { key: 'crash', value: @projects['crash']['name'] } if deploy_crash?
|
908
|
+
when 'starsky', 'hutch', 'maia'
|
909
|
+
tags << { key: key.to_s, value: @projects[key.to_s]['name'] } if deploy_starsky_hutch_maia?
|
918
910
|
else
|
919
|
-
tags << { key: key, value: value[
|
911
|
+
tags << { key: key, value: value['name'] }
|
920
912
|
end
|
921
913
|
end
|
922
914
|
|
@@ -957,30 +949,31 @@ class Release
|
|
957
949
|
|
958
950
|
output "check pyxis \n".yellow
|
959
951
|
|
960
|
-
create_pyxis_artifact(@projects["pyxis-npm"][
|
961
|
-
create_prima_artifact(@projects["prima"][
|
952
|
+
create_pyxis_artifact(@projects["pyxis-npm"]['revision'], deploy_id) unless @projects["pyxis-npm"].nil? # deve essere creato prima di quello di prima, per avere la versione
|
953
|
+
create_prima_artifact(@projects["prima"]['revision'], @projects["prima"]['name'], deploy_id) unless artifact_exists?('prima-artifacts-encrypted', "prima/#{@projects["prima"]['revision']}.tar.gz")
|
962
954
|
# l'artefatto di prima viene creato sempre (puntamenti all'ambiente compilati nel js) e richiede molto più di 4 minuti
|
963
955
|
wait_for_stack_ready(stack_name_db) unless stack_ready?(stack_name_db) # dovrebbe essere istantaneo
|
964
956
|
db_task = ''
|
965
957
|
db_task = import_dbs(ec2_ip_address(asg_stack_name)) unless stack_exists?("ecs-route53-qa-#{deploy_id}") # import asincrono dei dati
|
966
958
|
|
967
|
-
create_crash_artifact(@projects['crash'][
|
968
|
-
create_urania_artifact(@projects["urania"][
|
969
|
-
create_roger_artifact(@projects["roger"][
|
970
|
-
create_ermes_artifact(@projects["ermes"][
|
971
|
-
create_bburago_artifact(@projects["bburago"][
|
972
|
-
create_hal9000_artifact(@projects["hal9000"][
|
973
|
-
create_rachele_artifact(@projects["rachele"][
|
974
|
-
create_fidaty_artifact(@projects["fidaty"][
|
975
|
-
create_peano_artifact(@projects["peano"][
|
976
|
-
create_rogoreport_artifact(@projects["rogoreport"][
|
977
|
-
create_assange_artifact(@projects["assange"][
|
978
|
-
create_borat_artifact(@projects["borat"][
|
979
|
-
create_activia_artifact(@projects["activia"][
|
980
|
-
create_leftorium_artifact(@projects["leftorium"][
|
981
|
-
create_skynet_artifact(@projects["skynet"][
|
982
|
-
create_starsky_artifact(@projects["starsky"][
|
983
|
-
create_hutch_artifact(@projects["hutch"][
|
959
|
+
create_crash_artifact(@projects['crash']['revision'], deploy_id) unless !deploy_crash? || artifact_exists?('prima-artifacts-encrypted', "microservices/crash/#{@projects['crash']['revision']}-qa.tar.gz")
|
960
|
+
create_urania_artifact(@projects["urania"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/urania/#{@projects["urania"]['revision']}-qa.tar.gz")
|
961
|
+
create_roger_artifact(@projects["roger"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/roger/#{@projects["roger"]['revision']}-qa.tar.gz")
|
962
|
+
create_ermes_artifact(@projects["ermes"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/ermes/#{@projects["ermes"]['revision']}-qa.tar.gz")
|
963
|
+
create_bburago_artifact(@projects["bburago"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/bburago/#{@projects["bburago"]['revision']}-qa.tar.gz")
|
964
|
+
create_hal9000_artifact(@projects["hal9000"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/hal9000/#{@projects["hal9000"]['revision']}-qa.tar.gz")
|
965
|
+
create_rachele_artifact(@projects["rachele"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/rachele/#{@projects["rachele"]['revision']}-qa.tar.gz")
|
966
|
+
create_fidaty_artifact(@projects["fidaty"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/fidaty/#{@projects["fidaty"]['revision']}-qa.tar.gz")
|
967
|
+
create_peano_artifact(@projects["peano"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/peano/#{@projects["peano"]['revision']}-qa.tar.gz")
|
968
|
+
create_rogoreport_artifact(@projects["rogoreport"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/rogoreport/rogoreport-#{@projects["rogoreport"]['revision']}-qa.tar.gz")
|
969
|
+
create_assange_artifact(@projects["assange"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/assange/#{@projects["assange"]['revision']}-qa.tar.gz")
|
970
|
+
create_borat_artifact(@projects["borat"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/borat/#{@projects["borat"]['revision']}-qa.tar.gz")
|
971
|
+
create_activia_artifact(@projects["activia"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/activia/#{@projects["activia"]['revision']}-qa.tar.gz")
|
972
|
+
create_leftorium_artifact(@projects["leftorium"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/leftorium/#{@projects["leftorium"]['revision']}-qa.tar.gz")
|
973
|
+
create_skynet_artifact(@projects["skynet"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/skynet/#{@projects["skynet"]['revision']}-qa.tar.gz")
|
974
|
+
create_starsky_artifact(@projects["starsky"]['revision']) unless !deploy_starsky_hutch_maia? || artifact_exists?('prima-artifacts-encrypted', "microservices/starsky/#{@projects["starsky"]['revision']}-qa.tar.gz")
|
975
|
+
create_hutch_artifact(@projects["hutch"]['revision']) unless !deploy_starsky_hutch_maia? || artifact_exists?('prima-artifacts-encrypted', "microservices/hutch/#{@projects["hutch"]['revision']}-qa.tar.gz")
|
976
|
+
create_maia_artifact(@projects["maia"]['revision']) unless !deploy_starsky_hutch_maia? || artifact_exists?('prima-artifacts-encrypted', "microservices/maia/#{@projects["maia"]['revision']}-qa.tar.gz")
|
984
977
|
|
985
978
|
wait_for_db_import(db_task) unless stack_exists?("ecs-route53-qa-#{deploy_id}") # dovrebbe essere istantaneo
|
986
979
|
|
@@ -1067,6 +1060,10 @@ class Release
|
|
1067
1060
|
{
|
1068
1061
|
parameter_key: 'HutchElbHostname',
|
1069
1062
|
parameter_value: get_alb_host(stack_name_alb)
|
1063
|
+
},
|
1064
|
+
{
|
1065
|
+
parameter_key: 'MaiaElbHostname',
|
1066
|
+
parameter_value: get_alb_host(stack_name_alb)
|
1070
1067
|
}
|
1071
1068
|
]
|
1072
1069
|
|
@@ -1074,7 +1071,7 @@ class Release
|
|
1074
1071
|
wait_for_stack_ready(stack_name_route53) unless stack_ready?(stack_name_route53)
|
1075
1072
|
|
1076
1073
|
stack_name_skynet = "ecs-task-skynet-qa-#{deploy_id}"
|
1077
|
-
git_checkout_version('skynet', @projects["skynet"][
|
1074
|
+
git_checkout_version('skynet', @projects["skynet"]['revision'])
|
1078
1075
|
stack_body = File.read('projects/skynet/deploy/task.yml')
|
1079
1076
|
parameters = [
|
1080
1077
|
{
|
@@ -1083,7 +1080,7 @@ class Release
|
|
1083
1080
|
},
|
1084
1081
|
{
|
1085
1082
|
parameter_key: "ReleaseVersion",
|
1086
|
-
parameter_value: @projects["skynet"][
|
1083
|
+
parameter_value: @projects["skynet"]['revision']
|
1087
1084
|
},
|
1088
1085
|
{
|
1089
1086
|
parameter_key: "TaskDesiredCount",
|
@@ -1104,13 +1101,13 @@ class Release
|
|
1104
1101
|
]
|
1105
1102
|
if stack_exists?(stack_name_skynet)
|
1106
1103
|
cur_version = get_currently_deployed_version(stack_name_skynet)
|
1107
|
-
update_stack(stack_name_skynet, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["skynet"][
|
1104
|
+
update_stack(stack_name_skynet, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["skynet"]['revision'])
|
1108
1105
|
else
|
1109
1106
|
create_stack(stack_name_skynet, stack_body, parameters, tags, @cf_role)
|
1110
1107
|
end
|
1111
1108
|
|
1112
1109
|
stack_name_urania = "ecs-task-urania-qa-#{deploy_id}"
|
1113
|
-
git_checkout_version('urania', @projects["urania"][
|
1110
|
+
git_checkout_version('urania', @projects["urania"]['revision'])
|
1114
1111
|
stack_body = File.read('projects/urania/deploy/task.yml')
|
1115
1112
|
parameters = [
|
1116
1113
|
{
|
@@ -1119,7 +1116,7 @@ class Release
|
|
1119
1116
|
},
|
1120
1117
|
{
|
1121
1118
|
parameter_key: "ReleaseVersion",
|
1122
|
-
parameter_value: @projects["urania"][
|
1119
|
+
parameter_value: @projects["urania"]['revision']
|
1123
1120
|
},
|
1124
1121
|
{
|
1125
1122
|
parameter_key: "TaskDesiredCount",
|
@@ -1140,13 +1137,13 @@ class Release
|
|
1140
1137
|
]
|
1141
1138
|
if stack_exists?(stack_name_urania)
|
1142
1139
|
cur_version = get_currently_deployed_version(stack_name_urania)
|
1143
|
-
update_stack(stack_name_urania, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["urania"][
|
1140
|
+
update_stack(stack_name_urania, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["urania"]['revision'])
|
1144
1141
|
else
|
1145
1142
|
create_stack(stack_name_urania, stack_body, parameters, tags, @cf_role)
|
1146
1143
|
end
|
1147
1144
|
|
1148
1145
|
stack_name_ermes = "ecs-task-ermes-qa-#{deploy_id}"
|
1149
|
-
git_checkout_version('ermes', @projects["ermes"][
|
1146
|
+
git_checkout_version('ermes', @projects["ermes"]['revision'])
|
1150
1147
|
stack_body = File.read('projects/ermes/deploy/task.yml')
|
1151
1148
|
parameters = [
|
1152
1149
|
{
|
@@ -1155,7 +1152,7 @@ class Release
|
|
1155
1152
|
},
|
1156
1153
|
{
|
1157
1154
|
parameter_key: "ReleaseVersion",
|
1158
|
-
parameter_value: "#{@projects['ermes'][
|
1155
|
+
parameter_value: "#{@projects['ermes']['revision']}"
|
1159
1156
|
},
|
1160
1157
|
{
|
1161
1158
|
parameter_key: "TaskDesiredCount",
|
@@ -1184,13 +1181,13 @@ class Release
|
|
1184
1181
|
]
|
1185
1182
|
if stack_exists?(stack_name_ermes)
|
1186
1183
|
cur_version = get_currently_deployed_version(stack_name_ermes)
|
1187
|
-
update_stack(stack_name_ermes, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["ermes"][
|
1184
|
+
update_stack(stack_name_ermes, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["ermes"]['revision'])
|
1188
1185
|
else
|
1189
1186
|
create_stack(stack_name_ermes, stack_body, parameters, tags, @cf_role)
|
1190
1187
|
end
|
1191
1188
|
|
1192
1189
|
stack_name_bburago = "ecs-task-bburago-qa-#{deploy_id}"
|
1193
|
-
git_checkout_version('bburago', @projects["bburago"][
|
1190
|
+
git_checkout_version('bburago', @projects["bburago"]['revision'])
|
1194
1191
|
stack_body = File.read('projects/bburago/deploy/task.yml')
|
1195
1192
|
parameters = [
|
1196
1193
|
{
|
@@ -1199,7 +1196,7 @@ class Release
|
|
1199
1196
|
},
|
1200
1197
|
{
|
1201
1198
|
parameter_key: "ReleaseVersion",
|
1202
|
-
parameter_value: @projects["bburago"][
|
1199
|
+
parameter_value: @projects["bburago"]['revision']
|
1203
1200
|
},
|
1204
1201
|
{
|
1205
1202
|
parameter_key: "ECSClusterName",
|
@@ -1220,13 +1217,13 @@ class Release
|
|
1220
1217
|
]
|
1221
1218
|
if stack_exists?(stack_name_bburago)
|
1222
1219
|
cur_version = get_currently_deployed_version(stack_name_bburago)
|
1223
|
-
update_stack(stack_name_bburago, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["bburago"][
|
1220
|
+
update_stack(stack_name_bburago, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["bburago"]['revision'])
|
1224
1221
|
else
|
1225
1222
|
create_stack(stack_name_bburago, stack_body, parameters, tags, @cf_role)
|
1226
1223
|
end
|
1227
1224
|
|
1228
1225
|
stack_name_hal9000 = "ecs-task-hal9000-qa-#{deploy_id}"
|
1229
|
-
git_checkout_version('hal9000', @projects["hal9000"][
|
1226
|
+
git_checkout_version('hal9000', @projects["hal9000"]['revision'])
|
1230
1227
|
stack_body = File.read('projects/hal9000/deploy/task.yml')
|
1231
1228
|
parameters = [
|
1232
1229
|
{
|
@@ -1235,7 +1232,7 @@ class Release
|
|
1235
1232
|
},
|
1236
1233
|
{
|
1237
1234
|
parameter_key: "ReleaseVersion",
|
1238
|
-
parameter_value: @projects["hal9000"][
|
1235
|
+
parameter_value: @projects["hal9000"]['revision']
|
1239
1236
|
},
|
1240
1237
|
{
|
1241
1238
|
parameter_key: "ECSClusterName",
|
@@ -1256,13 +1253,13 @@ class Release
|
|
1256
1253
|
]
|
1257
1254
|
if stack_exists?(stack_name_hal9000)
|
1258
1255
|
cur_version = get_currently_deployed_version(stack_name_hal9000)
|
1259
|
-
update_stack(stack_name_hal9000, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["hal9000"][
|
1256
|
+
update_stack(stack_name_hal9000, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["hal9000"]['revision'])
|
1260
1257
|
else
|
1261
1258
|
create_stack(stack_name_hal9000, stack_body, parameters, tags, @cf_role)
|
1262
1259
|
end
|
1263
1260
|
|
1264
1261
|
stack_name_fidaty = "ecs-task-fidaty-qa-#{deploy_id}"
|
1265
|
-
git_checkout_version('fidaty', @projects["fidaty"][
|
1262
|
+
git_checkout_version('fidaty', @projects["fidaty"]['revision'])
|
1266
1263
|
stack_body = File.read('projects/fidaty/deploy/task.yml')
|
1267
1264
|
parameters = [
|
1268
1265
|
{
|
@@ -1271,7 +1268,7 @@ class Release
|
|
1271
1268
|
},
|
1272
1269
|
{
|
1273
1270
|
parameter_key: "ReleaseVersion",
|
1274
|
-
parameter_value: "#{@projects["fidaty"][
|
1271
|
+
parameter_value: "#{@projects["fidaty"]['revision']}"
|
1275
1272
|
},
|
1276
1273
|
{
|
1277
1274
|
parameter_key: "ECSClusterName",
|
@@ -1296,13 +1293,13 @@ class Release
|
|
1296
1293
|
]
|
1297
1294
|
if stack_exists?(stack_name_fidaty)
|
1298
1295
|
cur_version = get_currently_deployed_version(stack_name_fidaty)
|
1299
|
-
update_stack(stack_name_fidaty, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["fidaty"][
|
1296
|
+
update_stack(stack_name_fidaty, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["fidaty"]['revision'])
|
1300
1297
|
else
|
1301
1298
|
create_stack(stack_name_fidaty, stack_body, parameters, tags, @cf_role)
|
1302
1299
|
end
|
1303
1300
|
|
1304
1301
|
stack_name_peano = "ecs-task-peano-qa-#{deploy_id}"
|
1305
|
-
git_checkout_version('peano', @projects["peano"][
|
1302
|
+
git_checkout_version('peano', @projects["peano"]['revision'])
|
1306
1303
|
stack_body = File.read('projects/peano/deploy/task.yml')
|
1307
1304
|
parameters = [
|
1308
1305
|
{
|
@@ -1311,7 +1308,7 @@ class Release
|
|
1311
1308
|
},
|
1312
1309
|
{
|
1313
1310
|
parameter_key: "ReleaseVersion",
|
1314
|
-
parameter_value: "#{@projects['peano'][
|
1311
|
+
parameter_value: "#{@projects['peano']['revision']}"
|
1315
1312
|
},
|
1316
1313
|
{
|
1317
1314
|
parameter_key: "ECSClusterName",
|
@@ -1340,13 +1337,13 @@ class Release
|
|
1340
1337
|
]
|
1341
1338
|
if stack_exists?(stack_name_peano)
|
1342
1339
|
cur_version = get_currently_deployed_version(stack_name_peano)
|
1343
|
-
update_stack(stack_name_peano, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["peano"][
|
1340
|
+
update_stack(stack_name_peano, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["peano"]['revision'])
|
1344
1341
|
else
|
1345
1342
|
create_stack(stack_name_peano, stack_body, parameters, tags, @cf_role)
|
1346
1343
|
end
|
1347
1344
|
|
1348
1345
|
stack_name_rogoreport = "ecs-task-rogoreport-qa-#{deploy_id}"
|
1349
|
-
git_checkout_version('rogoreport', @projects["rogoreport"][
|
1346
|
+
git_checkout_version('rogoreport', @projects["rogoreport"]['revision'])
|
1350
1347
|
stack_body = IO.read('projects/rogoreport/deploy/task.yml')
|
1351
1348
|
parameters = [
|
1352
1349
|
{
|
@@ -1355,7 +1352,7 @@ class Release
|
|
1355
1352
|
},
|
1356
1353
|
{
|
1357
1354
|
parameter_key: "ReleaseVersion",
|
1358
|
-
parameter_value: "#{@projects["rogoreport"][
|
1355
|
+
parameter_value: "#{@projects["rogoreport"]['revision']}"
|
1359
1356
|
},
|
1360
1357
|
{
|
1361
1358
|
parameter_key: "ReleaseName",
|
@@ -1368,13 +1365,13 @@ class Release
|
|
1368
1365
|
]
|
1369
1366
|
if stack_exists?(stack_name_rogoreport)
|
1370
1367
|
cur_version = get_currently_deployed_version(stack_name_rogoreport)
|
1371
|
-
update_stack(stack_name_rogoreport, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["rogoreport"][
|
1368
|
+
update_stack(stack_name_rogoreport, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["rogoreport"]['revision'])
|
1372
1369
|
else
|
1373
1370
|
create_stack(stack_name_rogoreport, stack_body, parameters, tags, @cf_role)
|
1374
1371
|
end
|
1375
1372
|
|
1376
1373
|
stack_name_assange = "ecs-task-assange-qa-#{deploy_id}"
|
1377
|
-
git_checkout_version('assange', @projects["assange"][
|
1374
|
+
git_checkout_version('assange', @projects["assange"]['revision'])
|
1378
1375
|
stack_body = IO.read('projects/assange/deploy/task.yml')
|
1379
1376
|
parameters = [
|
1380
1377
|
{
|
@@ -1383,7 +1380,7 @@ class Release
|
|
1383
1380
|
},
|
1384
1381
|
{
|
1385
1382
|
parameter_key: "ReleaseVersion",
|
1386
|
-
parameter_value: "#{@projects["assange"][
|
1383
|
+
parameter_value: "#{@projects["assange"]['revision']}"
|
1387
1384
|
},
|
1388
1385
|
{
|
1389
1386
|
parameter_key: "ECSClusterName",
|
@@ -1420,13 +1417,13 @@ class Release
|
|
1420
1417
|
]
|
1421
1418
|
if stack_exists?(stack_name_assange)
|
1422
1419
|
cur_version = get_currently_deployed_version(stack_name_assange)
|
1423
|
-
update_stack(stack_name_assange, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["assange"][
|
1420
|
+
update_stack(stack_name_assange, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["assange"]['revision'])
|
1424
1421
|
else
|
1425
1422
|
create_stack(stack_name_assange, stack_body, parameters, tags, @cf_role)
|
1426
1423
|
end
|
1427
1424
|
|
1428
1425
|
stack_name_leftorium = "ecs-task-leftorium-qa-#{deploy_id}"
|
1429
|
-
git_checkout_version('leftorium', @projects["leftorium"][
|
1426
|
+
git_checkout_version('leftorium', @projects["leftorium"]['revision'])
|
1430
1427
|
stack_body = File.read('projects/leftorium/deploy/task.yml')
|
1431
1428
|
parameters = [
|
1432
1429
|
{
|
@@ -1435,7 +1432,7 @@ class Release
|
|
1435
1432
|
},
|
1436
1433
|
{
|
1437
1434
|
parameter_key: "ReleaseVersion",
|
1438
|
-
parameter_value: "#{@projects["leftorium"][
|
1435
|
+
parameter_value: "#{@projects["leftorium"]['revision']}"
|
1439
1436
|
},
|
1440
1437
|
{
|
1441
1438
|
parameter_key: "ECSClusterName",
|
@@ -1456,13 +1453,13 @@ class Release
|
|
1456
1453
|
]
|
1457
1454
|
if stack_exists?(stack_name_leftorium)
|
1458
1455
|
cur_version = get_currently_deployed_version(stack_name_leftorium)
|
1459
|
-
update_stack(stack_name_leftorium, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["leftorium"][
|
1456
|
+
update_stack(stack_name_leftorium, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["leftorium"]['revision'])
|
1460
1457
|
else
|
1461
1458
|
create_stack(stack_name_leftorium, stack_body, parameters, tags, @cf_role)
|
1462
1459
|
end
|
1463
1460
|
|
1464
1461
|
stack_name_rachele = "ecs-task-rachele-qa-#{deploy_id}"
|
1465
|
-
git_checkout_version('rachele', @projects["rachele"][
|
1462
|
+
git_checkout_version('rachele', @projects["rachele"]['revision'])
|
1466
1463
|
stack_body = File.read('projects/rachele/deploy/task.yml')
|
1467
1464
|
parameters = [
|
1468
1465
|
{
|
@@ -1471,7 +1468,7 @@ class Release
|
|
1471
1468
|
},
|
1472
1469
|
{
|
1473
1470
|
parameter_key: "ReleaseVersion",
|
1474
|
-
parameter_value: "#{@projects["rachele"][
|
1471
|
+
parameter_value: "#{@projects["rachele"]['revision']}"
|
1475
1472
|
},
|
1476
1473
|
{
|
1477
1474
|
parameter_key: "ECSClusterName",
|
@@ -1496,13 +1493,13 @@ class Release
|
|
1496
1493
|
]
|
1497
1494
|
if stack_exists?(stack_name_rachele)
|
1498
1495
|
cur_version = get_currently_deployed_version(stack_name_rachele)
|
1499
|
-
update_stack(stack_name_rachele, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["rachele"][
|
1496
|
+
update_stack(stack_name_rachele, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["rachele"]['revision'])
|
1500
1497
|
else
|
1501
1498
|
create_stack(stack_name_rachele, stack_body, parameters, tags, @cf_role)
|
1502
1499
|
end
|
1503
1500
|
|
1504
1501
|
stack_name_borat = "ecs-task-borat-qa-#{deploy_id}"
|
1505
|
-
git_checkout_version('borat', @projects["borat"][
|
1502
|
+
git_checkout_version('borat', @projects["borat"]['revision'])
|
1506
1503
|
stack_body = IO.read('projects/borat/deploy/task.yml')
|
1507
1504
|
parameters = [
|
1508
1505
|
{
|
@@ -1511,7 +1508,7 @@ class Release
|
|
1511
1508
|
},
|
1512
1509
|
{
|
1513
1510
|
parameter_key: "ReleaseVersion",
|
1514
|
-
parameter_value: "#{@projects["borat"][
|
1511
|
+
parameter_value: "#{@projects["borat"]['revision']}"
|
1515
1512
|
},
|
1516
1513
|
{
|
1517
1514
|
parameter_key: "ECSClusterName",
|
@@ -1556,13 +1553,13 @@ class Release
|
|
1556
1553
|
]
|
1557
1554
|
if stack_exists?(stack_name_borat)
|
1558
1555
|
cur_version = get_currently_deployed_version(stack_name_borat)
|
1559
|
-
update_stack(stack_name_borat, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["borat"][
|
1556
|
+
update_stack(stack_name_borat, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["borat"]['revision'])
|
1560
1557
|
else
|
1561
1558
|
create_stack(stack_name_borat, stack_body, parameters, tags, @cf_role)
|
1562
1559
|
end
|
1563
1560
|
|
1564
1561
|
if deploy_crash?
|
1565
|
-
git_checkout_version('crash', @projects['crash'][
|
1562
|
+
git_checkout_version('crash', @projects['crash']['revision'])
|
1566
1563
|
stack_name_crash = "ecs-task-crash-qa-#{deploy_id}"
|
1567
1564
|
stack_body = IO.read('projects/crash/deploy/task.yml')
|
1568
1565
|
parameters = [
|
@@ -1572,7 +1569,7 @@ class Release
|
|
1572
1569
|
},
|
1573
1570
|
{
|
1574
1571
|
parameter_key: 'ReleaseVersion',
|
1575
|
-
parameter_value: "#{@projects['crash'][
|
1572
|
+
parameter_value: "#{@projects['crash']['revision']}"
|
1576
1573
|
},
|
1577
1574
|
{
|
1578
1575
|
parameter_key: 'TaskDesiredCount',
|
@@ -1613,15 +1610,15 @@ class Release
|
|
1613
1610
|
]
|
1614
1611
|
if stack_exists?(stack_name_crash)
|
1615
1612
|
cur_version = get_currently_deployed_version(stack_name_crash)
|
1616
|
-
update_stack(stack_name_crash, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["crash"][
|
1613
|
+
update_stack(stack_name_crash, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["crash"]['revision'])
|
1617
1614
|
else
|
1618
1615
|
create_stack(stack_name_crash, stack_body, parameters, tags, @cf_role)
|
1619
1616
|
end
|
1620
1617
|
end
|
1621
1618
|
|
1622
|
-
if
|
1619
|
+
if deploy_starsky_hutch_maia?
|
1623
1620
|
stack_name_starsky = "ecs-task-starsky-qa-#{deploy_id}"
|
1624
|
-
git_checkout_version('starsky', @projects["starsky"][
|
1621
|
+
git_checkout_version('starsky', @projects["starsky"]['revision'])
|
1625
1622
|
stack_body = IO.read('projects/starsky/deploy/task.yml')
|
1626
1623
|
parameters = [
|
1627
1624
|
{
|
@@ -1630,7 +1627,7 @@ class Release
|
|
1630
1627
|
},
|
1631
1628
|
{
|
1632
1629
|
parameter_key: "ReleaseVersion",
|
1633
|
-
parameter_value: "#{@projects["starsky"][
|
1630
|
+
parameter_value: "#{@projects["starsky"]['revision']}"
|
1634
1631
|
},
|
1635
1632
|
{
|
1636
1633
|
parameter_key: "TaskDesiredCount",
|
@@ -1659,14 +1656,14 @@ class Release
|
|
1659
1656
|
]
|
1660
1657
|
if stack_exists?(stack_name_starsky)
|
1661
1658
|
cur_version = get_currently_deployed_version(stack_name_starsky)
|
1662
|
-
update_stack(stack_name_starsky, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["starsky"][
|
1659
|
+
update_stack(stack_name_starsky, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["starsky"]['revision'])
|
1663
1660
|
else
|
1664
1661
|
create_stack(stack_name_starsky, stack_body, parameters, tags, @cf_role)
|
1665
1662
|
end
|
1666
1663
|
end
|
1667
1664
|
|
1668
1665
|
stack_name_activia = "ecs-task-activia-qa-#{deploy_id}"
|
1669
|
-
git_checkout_version('activia', @projects["activia"][
|
1666
|
+
git_checkout_version('activia', @projects["activia"]['revision'])
|
1670
1667
|
stack_body = File.read('projects/activia/deploy/task.yml')
|
1671
1668
|
parameters = [
|
1672
1669
|
{
|
@@ -1675,7 +1672,7 @@ class Release
|
|
1675
1672
|
},
|
1676
1673
|
{
|
1677
1674
|
parameter_key: "ReleaseVersion",
|
1678
|
-
parameter_value: "#{@projects["activia"][
|
1675
|
+
parameter_value: "#{@projects["activia"]['revision']}"
|
1679
1676
|
},
|
1680
1677
|
{
|
1681
1678
|
parameter_key: "ECSClusterName",
|
@@ -1704,7 +1701,7 @@ class Release
|
|
1704
1701
|
]
|
1705
1702
|
if stack_exists?(stack_name_activia)
|
1706
1703
|
cur_version = get_currently_deployed_version(stack_name_activia)
|
1707
|
-
update_stack(stack_name_activia, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["activia"][
|
1704
|
+
update_stack(stack_name_activia, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["activia"]['revision'])
|
1708
1705
|
else
|
1709
1706
|
create_stack(stack_name_activia, stack_body, parameters, tags, @cf_role)
|
1710
1707
|
end
|
@@ -1720,7 +1717,7 @@ class Release
|
|
1720
1717
|
wait_for_stack_ready(stack_name_rachele) unless stack_ready?(stack_name_rachele)
|
1721
1718
|
|
1722
1719
|
stack_name_web = "ecs-task-web-qa-#{deploy_id}"
|
1723
|
-
git_checkout_version('prima', @projects["prima"][
|
1720
|
+
git_checkout_version('prima', @projects["prima"]['revision'])
|
1724
1721
|
stack_body = IO.read('projects/prima/app/cloudformation/tasks/web.yml')
|
1725
1722
|
parameters = [
|
1726
1723
|
{
|
@@ -1729,7 +1726,7 @@ class Release
|
|
1729
1726
|
},
|
1730
1727
|
{
|
1731
1728
|
parameter_key: "ReleaseVersion",
|
1732
|
-
parameter_value: "#{@projects["prima"][
|
1729
|
+
parameter_value: "#{@projects["prima"]['revision']}"
|
1733
1730
|
},
|
1734
1731
|
{
|
1735
1732
|
parameter_key: "TaskDesiredCount",
|
@@ -1786,13 +1783,13 @@ class Release
|
|
1786
1783
|
]
|
1787
1784
|
if stack_exists?(stack_name_web)
|
1788
1785
|
cur_version = get_currently_deployed_version(stack_name_web)
|
1789
|
-
update_stack(stack_name_web, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["prima"][
|
1786
|
+
update_stack(stack_name_web, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["prima"]['revision'])
|
1790
1787
|
else
|
1791
1788
|
create_stack(stack_name_web, stack_body, parameters, tags, @cf_role)
|
1792
1789
|
end
|
1793
1790
|
|
1794
1791
|
stack_name_consumer = "ecs-task-consumer-qa-#{deploy_id}"
|
1795
|
-
git_checkout_version('prima', @projects["prima"][
|
1792
|
+
git_checkout_version('prima', @projects["prima"]['revision'])
|
1796
1793
|
stack_body = IO.read('projects/prima/app/cloudformation/tasks/consumer.yml')
|
1797
1794
|
parameters = [
|
1798
1795
|
{
|
@@ -1801,7 +1798,7 @@ class Release
|
|
1801
1798
|
},
|
1802
1799
|
{
|
1803
1800
|
parameter_key: "ReleaseVersion",
|
1804
|
-
parameter_value: "#{@projects["prima"][
|
1801
|
+
parameter_value: "#{@projects["prima"]['revision']}"
|
1805
1802
|
},
|
1806
1803
|
{
|
1807
1804
|
parameter_key: "ECSClusterName",
|
@@ -1834,13 +1831,13 @@ class Release
|
|
1834
1831
|
]
|
1835
1832
|
if stack_exists?(stack_name_consumer)
|
1836
1833
|
cur_version = get_currently_deployed_version(stack_name_consumer)
|
1837
|
-
update_stack(stack_name_consumer, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["prima"][
|
1834
|
+
update_stack(stack_name_consumer, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["prima"]['revision'])
|
1838
1835
|
else
|
1839
1836
|
create_stack(stack_name_consumer, stack_body, parameters, tags, @cf_role)
|
1840
1837
|
end
|
1841
1838
|
|
1842
1839
|
stack_name_roger = "ecs-task-roger-qa-#{deploy_id}"
|
1843
|
-
git_checkout_version('roger', @projects["roger"][
|
1840
|
+
git_checkout_version('roger', @projects["roger"]['revision'])
|
1844
1841
|
stack_body = File.read('projects/roger/deploy/task.yml')
|
1845
1842
|
parameters = [
|
1846
1843
|
{
|
@@ -1849,7 +1846,7 @@ class Release
|
|
1849
1846
|
},
|
1850
1847
|
{
|
1851
1848
|
parameter_key: "ReleaseVersion",
|
1852
|
-
parameter_value: @projects["roger"][
|
1849
|
+
parameter_value: @projects["roger"]['revision']
|
1853
1850
|
},
|
1854
1851
|
{
|
1855
1852
|
parameter_key: "TaskDesiredCount",
|
@@ -1870,17 +1867,17 @@ class Release
|
|
1870
1867
|
]
|
1871
1868
|
if stack_exists?(stack_name_roger)
|
1872
1869
|
cur_version = get_currently_deployed_version(stack_name_roger)
|
1873
|
-
update_stack(stack_name_roger, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["roger"][
|
1870
|
+
update_stack(stack_name_roger, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["roger"]['revision'])
|
1874
1871
|
else
|
1875
1872
|
create_stack(stack_name_roger, stack_body, parameters, tags, @cf_role)
|
1876
1873
|
end
|
1877
1874
|
|
1878
1875
|
|
1879
|
-
if
|
1880
|
-
wait_for_stack_ready(stack_name_starsky) unless stack_ready?(stack_name_starsky) unless !
|
1876
|
+
if deploy_starsky_hutch_maia?
|
1877
|
+
wait_for_stack_ready(stack_name_starsky) unless stack_ready?(stack_name_starsky) unless !deploy_starsky_hutch_maia?
|
1881
1878
|
|
1882
1879
|
stack_name_hutch = "ecs-task-hutch-qa-#{deploy_id}"
|
1883
|
-
git_checkout_version('hutch', @projects["hutch"][
|
1880
|
+
git_checkout_version('hutch', @projects["hutch"]['revision'])
|
1884
1881
|
stack_body = File.read('projects/hutch/deploy/task.yml')
|
1885
1882
|
parameters = [
|
1886
1883
|
{
|
@@ -1889,7 +1886,7 @@ class Release
|
|
1889
1886
|
},
|
1890
1887
|
{
|
1891
1888
|
parameter_key: "ReleaseVersion",
|
1892
|
-
parameter_value: "#{@projects["hutch"][
|
1889
|
+
parameter_value: "#{@projects["hutch"]['revision']}"
|
1893
1890
|
},
|
1894
1891
|
{
|
1895
1892
|
parameter_key: "ALBShortName",
|
@@ -1918,12 +1915,60 @@ class Release
|
|
1918
1915
|
]
|
1919
1916
|
if stack_exists?(stack_name_hutch)
|
1920
1917
|
cur_version = get_currently_deployed_version(stack_name_hutch)
|
1921
|
-
update_stack(stack_name_hutch, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["hutch"][
|
1918
|
+
update_stack(stack_name_hutch, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["hutch"]['revision'])
|
1922
1919
|
else
|
1923
1920
|
create_stack(stack_name_hutch, stack_body, parameters, tags, @cf_role)
|
1924
1921
|
end
|
1925
1922
|
end
|
1926
1923
|
|
1924
|
+
stack_name_maia = "ecs-task-maia-qa-#{deploy_id}"
|
1925
|
+
git_checkout_version('maia', @projects["maia"][:revision])
|
1926
|
+
stack_body = File.read('projects/maia/deploy/task.yml')
|
1927
|
+
parameters = [
|
1928
|
+
{
|
1929
|
+
parameter_key: "Environment",
|
1930
|
+
parameter_value: "qa"
|
1931
|
+
},
|
1932
|
+
{
|
1933
|
+
parameter_key: "ReleaseVersion",
|
1934
|
+
parameter_value: "#{@projects["maia"][:revision]}"
|
1935
|
+
},
|
1936
|
+
{
|
1937
|
+
parameter_key: "ALBShortName",
|
1938
|
+
parameter_value: "maia-qa-#{deploy_id}"[0..27]
|
1939
|
+
},
|
1940
|
+
{
|
1941
|
+
parameter_key: "ECSClusterName",
|
1942
|
+
parameter_value: @ecs_cluster_name
|
1943
|
+
},
|
1944
|
+
{
|
1945
|
+
parameter_key: "EnvHash",
|
1946
|
+
parameter_value: deploy_id
|
1947
|
+
},
|
1948
|
+
{
|
1949
|
+
parameter_key: "HostnamePatternPublic",
|
1950
|
+
parameter_value: "api*-#{@dns_record_identifier}.qa.colaster.com"
|
1951
|
+
},
|
1952
|
+
{
|
1953
|
+
parameter_key: "HostnamePatternPriority",
|
1954
|
+
parameter_value: (hostname_pattern_priority.to_i + 128).to_s
|
1955
|
+
},
|
1956
|
+
{
|
1957
|
+
parameter_key: "ProxyHostnameIntermediari",
|
1958
|
+
parameter_value: "api-intermediari-#{@dns_record_identifier}.qa.colaster.com"
|
1959
|
+
},
|
1960
|
+
{
|
1961
|
+
parameter_key: "ProxyHostnameApp",
|
1962
|
+
parameter_value: "api-#{@dns_record_identifier}.qa.colaster.com"
|
1963
|
+
}
|
1964
|
+
]
|
1965
|
+
if stack_exists?(stack_name_maia)
|
1966
|
+
cur_version = get_currently_deployed_version(stack_name_maia)
|
1967
|
+
update_stack(stack_name_maia, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["maia"][:revision])
|
1968
|
+
else
|
1969
|
+
create_stack(stack_name_maia, stack_body, parameters, tags, @cf_role)
|
1970
|
+
end
|
1971
|
+
|
1927
1972
|
wait_for_stack_ready(stack_name_web) unless stack_ready?(stack_name_web)
|
1928
1973
|
wait_for_stack_ready(stack_name_consumer) unless stack_ready?(stack_name_consumer)
|
1929
1974
|
wait_for_stack_ready(stack_name_ermes) unless stack_ready?(stack_name_ermes)
|
@@ -1933,7 +1978,8 @@ class Release
|
|
1933
1978
|
wait_for_stack_ready(stack_name_borat) unless stack_ready?(stack_name_borat)
|
1934
1979
|
wait_for_stack_ready(stack_name_activia) unless stack_ready?(stack_name_activia)
|
1935
1980
|
wait_for_stack_ready(stack_name_crash) unless stack_ready?(stack_name_crash) unless !deploy_crash?
|
1936
|
-
wait_for_stack_ready(stack_name_hutch) unless stack_ready?(stack_name_hutch) unless !
|
1981
|
+
wait_for_stack_ready(stack_name_hutch) unless stack_ready?(stack_name_hutch) unless !deploy_starsky_hutch_maia?
|
1982
|
+
wait_for_stack_ready(stack_name_maia) unless stack_ready?(stack_name_maia) unless !deploy_starsky_hutch_maia?
|
1937
1983
|
|
1938
1984
|
update_service_defaults(stack_name_web)
|
1939
1985
|
update_service_defaults(stack_name_consumer)
|
@@ -1950,27 +1996,30 @@ class Release
|
|
1950
1996
|
update_service_defaults(stack_name_skynet)
|
1951
1997
|
update_service_defaults(stack_name_leftorium)
|
1952
1998
|
update_service_defaults(stack_name_rachele)
|
1953
|
-
update_service_defaults(stack_name_starsky) unless !
|
1954
|
-
update_service_defaults(stack_name_hutch) unless !
|
1999
|
+
update_service_defaults(stack_name_starsky) unless !deploy_starsky_hutch_maia?
|
2000
|
+
update_service_defaults(stack_name_hutch) unless !deploy_starsky_hutch_maia?
|
2001
|
+
update_service_defaults(stack_name_maia) unless !deploy_starsky_hutch_maia?
|
1955
2002
|
update_service_defaults(stack_name_crash) unless !deploy_crash?
|
1956
2003
|
|
1957
|
-
activia_hostname = get_route53_hostname(
|
1958
|
-
assange_hostname = get_route53_hostname(
|
1959
|
-
bburago_hostname = get_route53_hostname(
|
1960
|
-
borat_hostname = get_route53_hostname(
|
1961
|
-
ermes_hostname = get_route53_hostname(
|
1962
|
-
fidaty_hostname = get_route53_hostname(
|
1963
|
-
hal9000_hostname = get_route53_hostname(
|
1964
|
-
prima_hostname = get_route53_hostname(
|
1965
|
-
peano_hostname = get_route53_hostname(
|
1966
|
-
skynet_hostname = get_route53_hostname(
|
1967
|
-
urania_hostname = get_route53_hostname(
|
1968
|
-
roger_hostname = get_route53_hostname(
|
1969
|
-
leftorium_hostname = get_route53_hostname(
|
1970
|
-
rachele_hostname = get_route53_hostname(
|
1971
|
-
crash_hostname = get_route53_hostname(
|
1972
|
-
starsky_hostname = get_route53_hostname(
|
1973
|
-
hutch_hostname = get_route53_hostname(
|
2004
|
+
activia_hostname = get_route53_hostname("activia")
|
2005
|
+
assange_hostname = get_route53_hostname("assange")
|
2006
|
+
bburago_hostname = get_route53_hostname("bburago")
|
2007
|
+
borat_hostname = get_route53_hostname("borat")
|
2008
|
+
ermes_hostname = get_route53_hostname("ermes")
|
2009
|
+
fidaty_hostname = get_route53_hostname("fidaty")
|
2010
|
+
hal9000_hostname = get_route53_hostname("hal9000")
|
2011
|
+
prima_hostname = get_route53_hostname("web")
|
2012
|
+
peano_hostname = get_route53_hostname("peano")
|
2013
|
+
skynet_hostname = get_route53_hostname("skynet")
|
2014
|
+
urania_hostname = get_route53_hostname("urania")
|
2015
|
+
roger_hostname = get_route53_hostname("roger")
|
2016
|
+
leftorium_hostname = get_route53_hostname("leftorium")
|
2017
|
+
rachele_hostname = get_route53_hostname("rachele")
|
2018
|
+
crash_hostname = get_route53_hostname("crash") unless !deploy_crash?
|
2019
|
+
starsky_hostname = get_route53_hostname("starsky") unless !deploy_starsky_hutch_maia?
|
2020
|
+
hutch_hostname = get_route53_hostname("hutch") unless !deploy_starsky_hutch_maia?
|
2021
|
+
maia_app_hostname = get_route53_hostname("maia-app") unless !deploy_starsky_hutch_maia?
|
2022
|
+
maia_intermediari_hostname = get_route53_hostname("maia-intermediari") unless !deploy_starsky_hutch_maia?
|
1974
2023
|
|
1975
2024
|
# launch_marley ec2_ip_address(asg_stack_name), prima_hostname, borat_hostname
|
1976
2025
|
|
@@ -1993,7 +2042,9 @@ class Release
|
|
1993
2042
|
> Crash url: https://#{crash_hostname}" if deploy_crash?
|
1994
2043
|
projects_text.concat "
|
1995
2044
|
> Starsky url: https://#{starsky_hostname}
|
1996
|
-
> Hutch url: https://#{hutch_hostname}
|
2045
|
+
> Hutch url: https://#{hutch_hostname}
|
2046
|
+
> Maia App url: https://#{maia_app_hostname}
|
2047
|
+
> Maia Intermediari url: https://#{maia_intermediari_hostname}" if deploy_starsky_hutch_maia?
|
1997
2048
|
projects_text.concat "
|
1998
2049
|
> RabbitMQ url: http://#{ec2_ip_address(asg_stack_name)}:15672
|
1999
2050
|
> Supervisor url: http://#{ec2_ip_address(asg_stack_name)}:9001
|
@@ -2005,42 +2056,46 @@ class Release
|
|
2005
2056
|
qainit_write_output(projects_text, 'Indirizzi scritti su ')
|
2006
2057
|
end
|
2007
2058
|
|
2008
|
-
def get_route53_hostname(
|
2059
|
+
def get_route53_hostname(project)
|
2009
2060
|
case
|
2010
|
-
when
|
2061
|
+
when project.include?('web')
|
2011
2062
|
host = "www-#{@dns_record_identifier}.qa.colaster.com"
|
2012
|
-
when
|
2063
|
+
when project.include?('urania')
|
2013
2064
|
host = "urania-#{@dns_record_identifier}.qa.colaster.com"
|
2014
|
-
when
|
2065
|
+
when project.include?('bburago')
|
2015
2066
|
host = "bburago-#{@dns_record_identifier}.qa.colaster.com"
|
2016
|
-
when
|
2067
|
+
when project.include?('hal9000')
|
2017
2068
|
host = "hal9000-#{@dns_record_identifier}.qa.colaster.com"
|
2018
|
-
when
|
2069
|
+
when project.include?('fidaty')
|
2019
2070
|
host = "fidaty-#{@dns_record_identifier}.qa.colaster.com"
|
2020
|
-
when
|
2071
|
+
when project.include?('peano')
|
2021
2072
|
host = "peano-#{@dns_record_identifier}.qa.colaster.com"
|
2022
|
-
when
|
2073
|
+
when project.include?('assange')
|
2023
2074
|
host = "assange-#{@dns_record_identifier}.qa.colaster.com"
|
2024
|
-
when
|
2075
|
+
when project.include?('borat')
|
2025
2076
|
host = "backoffice-#{@dns_record_identifier}.qa.colaster.com"
|
2026
|
-
when
|
2077
|
+
when project.include?('crash')
|
2027
2078
|
host = "crash-#{@dns_record_identifier}.qa.colaster.com"
|
2028
|
-
when
|
2079
|
+
when project.include?('ermes')
|
2029
2080
|
host = "ermes-#{@dns_record_identifier}.qa.colaster.com"
|
2030
|
-
when
|
2081
|
+
when project.include?('activia')
|
2031
2082
|
host = "activia-#{@dns_record_identifier}.qa.colaster.com"
|
2032
|
-
when
|
2083
|
+
when project.include?('skynet')
|
2033
2084
|
host = "skynet-#{@dns_record_identifier}.qa.colaster.com"
|
2034
|
-
when
|
2085
|
+
when project.include?('roger')
|
2035
2086
|
host = "roger-#{@dns_record_identifier}.qa.colaster.com"
|
2036
|
-
when
|
2087
|
+
when project.include?('leftorium')
|
2037
2088
|
host = "leftorium-#{@dns_record_identifier}.qa.colaster.com"
|
2038
|
-
when
|
2089
|
+
when project.include?('rachele')
|
2039
2090
|
host = "rachele-#{@dns_record_identifier}.qa.colaster.com"
|
2040
|
-
when
|
2091
|
+
when project.include?('starsky')
|
2041
2092
|
host = "starsky-#{@dns_record_identifier}.qa.colaster.com"
|
2042
|
-
when
|
2093
|
+
when project.include?('hutch')
|
2043
2094
|
host = "hutch-#{@dns_record_identifier}.qa.colaster.com"
|
2095
|
+
when project.include?('maia-app')
|
2096
|
+
host = "api-#{@dns_record_identifier}.qa.colaster.com"
|
2097
|
+
when project.include?('maia-intermediari')
|
2098
|
+
host = "api-intermediari-#{@dns_record_identifier}.qa.colaster.com"
|
2044
2099
|
end
|
2045
2100
|
host
|
2046
2101
|
end
|
@@ -2099,6 +2154,8 @@ class Release
|
|
2099
2154
|
logical_resource_id = 'EcsApplicationLoadBalancerPublic'
|
2100
2155
|
when stack_name.include?('hutch')
|
2101
2156
|
logical_resource_id = 'EcsApplicationLoadBalancerPublic'
|
2157
|
+
when stack_name.include?('maia')
|
2158
|
+
logical_resource_id = 'EcsApplicationLoadBalancerPublic'
|
2102
2159
|
end
|
2103
2160
|
resp = @cf.describe_stack_resource({
|
2104
2161
|
stack_name: stack_name,
|
@@ -2152,6 +2209,8 @@ class Release
|
|
2152
2209
|
logical_resource_id = 'ECSServiceStarskyQA'
|
2153
2210
|
when stack_name.include?('hutch')
|
2154
2211
|
logical_resource_id = 'ECSServiceHutch'
|
2212
|
+
when stack_name.include?('maia')
|
2213
|
+
logical_resource_id = 'ECSServiceMaia'
|
2155
2214
|
else
|
2156
2215
|
raise "Service name non gestito per lo stack #{stack_name}"
|
2157
2216
|
end
|
@@ -2505,6 +2564,41 @@ class Release
|
|
2505
2564
|
Dir.chdir '../../'
|
2506
2565
|
end
|
2507
2566
|
|
2567
|
+
def create_maia_artifact(revision)
|
2568
|
+
output "Preparo l'artifact maia .zip\n".yellow
|
2569
|
+
|
2570
|
+
git_checkout_version('maia', revision)
|
2571
|
+
|
2572
|
+
Dir.chdir 'projects/maia'
|
2573
|
+
|
2574
|
+
decrypt_secrets()
|
2575
|
+
|
2576
|
+
exec_step 'prepare-docker-compose --directory maia'
|
2577
|
+
|
2578
|
+
if File.exists? 'deploy/build_qa_artifact'
|
2579
|
+
exec_step 'deploy/build_qa_artifact'
|
2580
|
+
else
|
2581
|
+
[
|
2582
|
+
"docker-compose build web",
|
2583
|
+
"docker-compose run -w $PWD -u root -e MIX_ENV=qa --entrypoint /bin/bash web \
|
2584
|
+
'-c' 'pwd && ls -al && \
|
2585
|
+
mix local.hex --force && \
|
2586
|
+
mix deps.get && \
|
2587
|
+
mix release.clean --implode --no-confirm && \
|
2588
|
+
mix release --env=qa'"
|
2589
|
+
].each do |cmd|
|
2590
|
+
execute_command cmd
|
2591
|
+
end
|
2592
|
+
end
|
2593
|
+
|
2594
|
+
cleanup_containers
|
2595
|
+
|
2596
|
+
artifact_path = Dir.glob('_build/qa/rel/maia/releases/*/maia.tar.gz').first
|
2597
|
+
upload_artifact(artifact_path, "microservices/maia/#{revision}-qa.tar.gz", "#{@s3_bucket}-encrypted")
|
2598
|
+
|
2599
|
+
Dir.chdir '../../'
|
2600
|
+
end
|
2601
|
+
|
2508
2602
|
def create_peano_artifact(revision)
|
2509
2603
|
output "Preparo l'artifact peano .zip\n".yellow
|
2510
2604
|
|
@@ -2797,7 +2891,7 @@ class Release
|
|
2797
2891
|
else
|
2798
2892
|
pyxis_updated = `git log -p -1 --unified=0 | grep pyxis-npm:`.length > 0
|
2799
2893
|
|
2800
|
-
update_pyxis = !@projects['pyxis-npm'].empty? && @projects['pyxis-npm'][
|
2894
|
+
update_pyxis = !@projects['pyxis-npm'].empty? && @projects['pyxis-npm']['name'] != 'master' && pyxis_updated
|
2801
2895
|
|
2802
2896
|
@deploy_pyxis = update_pyxis
|
2803
2897
|
return update_pyxis
|
@@ -2805,15 +2899,16 @@ class Release
|
|
2805
2899
|
end
|
2806
2900
|
|
2807
2901
|
def deploy_crash?
|
2808
|
-
crash_present = !@projects['crash'].empty? && @projects['crash'][
|
2809
|
-
leftorium_present = !@projects['leftorium'].empty? && @projects['leftorium'][
|
2902
|
+
crash_present = !@projects['crash'].empty? && @projects['crash']['name'] != 'master' && !@projects['crash']['default_branch']
|
2903
|
+
leftorium_present = !@projects['leftorium'].empty? && @projects['leftorium']['name'] != 'master' && !@projects['leftorium']['default_branch']
|
2810
2904
|
crash_present || leftorium_present
|
2811
2905
|
end
|
2812
2906
|
|
2813
|
-
def
|
2814
|
-
starsky_present = !@projects['starsky'].nil? && !@projects['starsky'].empty? && @projects['starsky'][
|
2815
|
-
hutch_present = !@projects['hutch'].nil? && !@projects['hutch'].empty? && @projects['hutch'][
|
2816
|
-
|
2907
|
+
def deploy_starsky_hutch_maia?
|
2908
|
+
starsky_present = !@projects['starsky'].nil? && !@projects['starsky'].empty? && @projects['starsky']['name'] != 'master' && !@projects['starsky']['default_branch']
|
2909
|
+
hutch_present = !@projects['hutch'].nil? && !@projects['hutch'].empty? && @projects['hutch']['name'] != 'master' && !@projects['hutch']['default_branch']
|
2910
|
+
maia_present = !@projects['maia'].nil? && !@projects['maia'].empty? && @projects['maia']['name'] != 'master' && !@projects['maia']['default_branch']
|
2911
|
+
starsky_present || hutch_present || maia_present
|
2817
2912
|
end
|
2818
2913
|
|
2819
2914
|
def get_pyxis_version(deploy_id)
|
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.56.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matteo Giachino
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2019-11-
|
17
|
+
date: 2019-11-22 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: aws-sdk
|