prima-twig 0.58.0 → 0.58.1
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 +136 -56
- 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: e3751068c41c6b18c18f87eddd928c1f07854c328e5d3dc8033efd315a4c316b
|
4
|
+
data.tar.gz: b40eafc87a7c47ac474566feafefdfc51dffe2a04542947ab72f7f725261eaf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64a137f991f9c4270617869b7b4b5bc3beb6723c585de09e6f13369bf7c0783b796f478032b8caf97fc5530c94018c1d472207de3c29f9e130b3629feda11ad2
|
7
|
+
data.tar.gz: 7dd07f32f8b2cf604d1df34a1694915b9e713ecdcebc3b5a0d0ed3c6866a44806110677586a372c7e780f36fcf4f23ba15d7f43e0fdda8e6026cb48fe856180a
|
data/bin/twig-feature
CHANGED
@@ -53,7 +53,8 @@ class Release
|
|
53
53
|
'leftorium' => {},
|
54
54
|
'pyxis-npm' => {},
|
55
55
|
'starsky' => {},
|
56
|
-
'hutch' => {}
|
56
|
+
'hutch' => {},
|
57
|
+
'maia' => {}
|
57
58
|
}
|
58
59
|
@base_stack_name_alb = 'ecs-alb-http-public-qa-'
|
59
60
|
@base_stack_name_alb_ws = 'ecs-alb-ws-public-qa-'
|
@@ -512,7 +513,7 @@ class Release
|
|
512
513
|
end
|
513
514
|
|
514
515
|
# così recupero le informazioni sul branch, poi vado a scrivere il file branch_names con una sola riga
|
515
|
-
branch = {'project' => { 'name' => project_definition[:name], 'revision' => project_definition[
|
516
|
+
branch = {'project' => { 'name' => project_definition[:name], 'revision' => project_definition['revision'], 'default_branch' => project_definition[:default_branch]}}
|
516
517
|
|
517
518
|
File.open('branch_names', 'w') { |file| file.write(JSON.generate(branch)) }
|
518
519
|
|
@@ -965,9 +966,11 @@ class Release
|
|
965
966
|
create_activia_artifact(@projects["activia"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/activia/#{@projects["activia"]['revision']}-qa.tar.gz")
|
966
967
|
create_leftorium_artifact(@projects["leftorium"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/leftorium/#{@projects["leftorium"]['revision']}-qa.tar.gz")
|
967
968
|
create_skynet_artifact(@projects["skynet"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/skynet/#{@projects["skynet"]['revision']}-qa.tar.gz")
|
969
|
+
create_maia_artifact(@projects["maia"]['revision']) unless artifact_exists?('prima-artifacts-encrypted', "microservices/maia/#{@projects["maia"]['revision']}-qa.tar.gz")
|
968
970
|
create_starsky_artifact(@projects["starsky"]['revision']) unless !deploy_starsky_hutch? || artifact_exists?('prima-artifacts-encrypted', "microservices/starsky/#{@projects["starsky"]['revision']}-qa.tar.gz")
|
969
971
|
create_hutch_artifact(@projects["hutch"]['revision']) unless !deploy_starsky_hutch? || artifact_exists?('prima-artifacts-encrypted', "microservices/hutch/#{@projects["hutch"]['revision']}-qa.tar.gz")
|
970
972
|
|
973
|
+
|
971
974
|
wait_for_db_import(db_task) unless stack_exists?("ecs-route53-qa-#{deploy_id}") # dovrebbe essere istantaneo
|
972
975
|
|
973
976
|
import_redis_crash(ec2_ip_address(asg_stack_name)) if deploy_crash? && !stack_exists?("ecs-task-web-qa-#{deploy_id}")
|
@@ -1053,6 +1056,10 @@ class Release
|
|
1053
1056
|
{
|
1054
1057
|
parameter_key: 'HutchElbHostname',
|
1055
1058
|
parameter_value: get_alb_host(stack_name_alb)
|
1059
|
+
},
|
1060
|
+
{
|
1061
|
+
parameter_key: 'MaiaElbHostname',
|
1062
|
+
parameter_value: get_alb_host(stack_name_alb)
|
1056
1063
|
}
|
1057
1064
|
]
|
1058
1065
|
|
@@ -1898,8 +1905,8 @@ class Release
|
|
1898
1905
|
parameter_value: (hostname_pattern_priority.to_i + 254).to_s
|
1899
1906
|
},
|
1900
1907
|
{
|
1901
|
-
parameter_key: "
|
1902
|
-
parameter_value: "https://#{get_route53_hostname('
|
1908
|
+
parameter_key: "ApiUrl",
|
1909
|
+
parameter_value: "https://#{get_route53_hostname('maia-intermediari')}"
|
1903
1910
|
}
|
1904
1911
|
]
|
1905
1912
|
if stack_exists?(stack_name_hutch)
|
@@ -1910,6 +1917,54 @@ class Release
|
|
1910
1917
|
end
|
1911
1918
|
end
|
1912
1919
|
|
1920
|
+
stack_name_maia = "ecs-task-maia-qa-#{deploy_id}"
|
1921
|
+
git_checkout_version('maia', @projects["maia"]['revision'])
|
1922
|
+
stack_body = File.read('projects/maia/deploy/task.yml')
|
1923
|
+
parameters = [
|
1924
|
+
{
|
1925
|
+
parameter_key: "Environment",
|
1926
|
+
parameter_value: "qa"
|
1927
|
+
},
|
1928
|
+
{
|
1929
|
+
parameter_key: "ReleaseVersion",
|
1930
|
+
parameter_value: "#{@projects["maia"]['revision']}"
|
1931
|
+
},
|
1932
|
+
{
|
1933
|
+
parameter_key: "ALBShortName",
|
1934
|
+
parameter_value: "maia-qa-#{deploy_id}"[0..15]
|
1935
|
+
},
|
1936
|
+
{
|
1937
|
+
parameter_key: "ECSClusterName",
|
1938
|
+
parameter_value: @ecs_cluster_name
|
1939
|
+
},
|
1940
|
+
{
|
1941
|
+
parameter_key: "EnvHash",
|
1942
|
+
parameter_value: deploy_id
|
1943
|
+
},
|
1944
|
+
{
|
1945
|
+
parameter_key: "HostnamePatternPublic",
|
1946
|
+
parameter_value: "api*-#{@dns_record_identifier}.qa.colaster.com"
|
1947
|
+
},
|
1948
|
+
{
|
1949
|
+
parameter_key: "HostnamePatternPriority",
|
1950
|
+
parameter_value: (hostname_pattern_priority.to_i + 128).to_s
|
1951
|
+
},
|
1952
|
+
{
|
1953
|
+
parameter_key: "ProxyHostnameIntermediari",
|
1954
|
+
parameter_value: "api-intermediari-#{@dns_record_identifier}.qa.colaster.com"
|
1955
|
+
},
|
1956
|
+
{
|
1957
|
+
parameter_key: "ProxyHostnameApp",
|
1958
|
+
parameter_value: "api-#{@dns_record_identifier}.qa.colaster.com"
|
1959
|
+
}
|
1960
|
+
]
|
1961
|
+
if stack_exists?(stack_name_maia)
|
1962
|
+
cur_version = get_currently_deployed_version(stack_name_maia)
|
1963
|
+
update_stack(stack_name_maia, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["maia"]['revision'])
|
1964
|
+
else
|
1965
|
+
create_stack(stack_name_maia, stack_body, parameters, tags, @cf_role)
|
1966
|
+
end
|
1967
|
+
|
1913
1968
|
wait_for_stack_ready(stack_name_web) unless stack_ready?(stack_name_web)
|
1914
1969
|
wait_for_stack_ready(stack_name_consumer) unless stack_ready?(stack_name_consumer)
|
1915
1970
|
wait_for_stack_ready(stack_name_ermes) unless stack_ready?(stack_name_ermes)
|
@@ -1918,9 +1973,11 @@ class Release
|
|
1918
1973
|
wait_for_stack_ready(stack_name_rogoreport) unless stack_ready?(stack_name_rogoreport)
|
1919
1974
|
wait_for_stack_ready(stack_name_borat) unless stack_ready?(stack_name_borat)
|
1920
1975
|
wait_for_stack_ready(stack_name_activia) unless stack_ready?(stack_name_activia)
|
1976
|
+
wait_for_stack_ready(stack_name_maia) unless stack_ready?(stack_name_maia)
|
1921
1977
|
wait_for_stack_ready(stack_name_crash) unless stack_ready?(stack_name_crash) unless !deploy_crash?
|
1922
1978
|
wait_for_stack_ready(stack_name_hutch) unless stack_ready?(stack_name_hutch) unless !deploy_starsky_hutch?
|
1923
1979
|
|
1980
|
+
|
1924
1981
|
update_service_defaults(stack_name_web)
|
1925
1982
|
update_service_defaults(stack_name_consumer)
|
1926
1983
|
update_service_defaults(stack_name_urania)
|
@@ -1936,27 +1993,31 @@ class Release
|
|
1936
1993
|
update_service_defaults(stack_name_skynet)
|
1937
1994
|
update_service_defaults(stack_name_leftorium)
|
1938
1995
|
update_service_defaults(stack_name_rachele)
|
1996
|
+
update_service_defaults(stack_name_maia)
|
1939
1997
|
update_service_defaults(stack_name_starsky) unless !deploy_starsky_hutch?
|
1940
1998
|
update_service_defaults(stack_name_hutch) unless !deploy_starsky_hutch?
|
1941
1999
|
update_service_defaults(stack_name_crash) unless !deploy_crash?
|
1942
2000
|
|
1943
|
-
activia_hostname = get_route53_hostname(
|
1944
|
-
assange_hostname = get_route53_hostname(
|
1945
|
-
bburago_hostname = get_route53_hostname(
|
1946
|
-
borat_hostname = get_route53_hostname(
|
1947
|
-
ermes_hostname = get_route53_hostname(
|
1948
|
-
fidaty_hostname = get_route53_hostname(
|
1949
|
-
hal9000_hostname = get_route53_hostname(
|
1950
|
-
prima_hostname = get_route53_hostname(
|
1951
|
-
peano_hostname = get_route53_hostname(
|
1952
|
-
skynet_hostname = get_route53_hostname(
|
1953
|
-
urania_hostname = get_route53_hostname(
|
1954
|
-
roger_hostname = get_route53_hostname(
|
1955
|
-
leftorium_hostname = get_route53_hostname(
|
1956
|
-
rachele_hostname = get_route53_hostname(
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
2001
|
+
activia_hostname = get_route53_hostname("activia")
|
2002
|
+
assange_hostname = get_route53_hostname("assange")
|
2003
|
+
bburago_hostname = get_route53_hostname("bburago")
|
2004
|
+
borat_hostname = get_route53_hostname("borat")
|
2005
|
+
ermes_hostname = get_route53_hostname("ermes")
|
2006
|
+
fidaty_hostname = get_route53_hostname("fidaty")
|
2007
|
+
hal9000_hostname = get_route53_hostname("hal9000")
|
2008
|
+
prima_hostname = get_route53_hostname("web")
|
2009
|
+
peano_hostname = get_route53_hostname("peano")
|
2010
|
+
skynet_hostname = get_route53_hostname("skynet")
|
2011
|
+
urania_hostname = get_route53_hostname("urania")
|
2012
|
+
roger_hostname = get_route53_hostname("roger")
|
2013
|
+
leftorium_hostname = get_route53_hostname("leftorium")
|
2014
|
+
rachele_hostname = get_route53_hostname("rachele")
|
2015
|
+
maia_app_hostname = get_route53_hostname("maia-app")
|
2016
|
+
maia_intermediari_hostname = get_route53_hostname("maia-intermediari")
|
2017
|
+
crash_hostname = get_route53_hostname("crash") unless !deploy_crash?
|
2018
|
+
starsky_hostname = get_route53_hostname("starsky") unless !deploy_starsky_hutch?
|
2019
|
+
hutch_hostname = get_route53_hostname("hutch") unless !deploy_starsky_hutch?
|
2020
|
+
|
1960
2021
|
|
1961
2022
|
# launch_marley ec2_ip_address(asg_stack_name), prima_hostname, borat_hostname
|
1962
2023
|
|
@@ -1974,7 +2035,9 @@ class Release
|
|
1974
2035
|
> Skynet url: http://#{skynet_hostname}:8050
|
1975
2036
|
> Roger url: http://#{roger_hostname}:10051
|
1976
2037
|
> Leftorium url: http://#{leftorium_hostname}:10061
|
1977
|
-
> Rachele url: http://#{rachele_hostname}:10040
|
2038
|
+
> Rachele url: http://#{rachele_hostname}:10040
|
2039
|
+
> Maia App url: https://#{maia_app_hostname}
|
2040
|
+
> Maia Intermediari url: https://#{maia_intermediari_hostname}"
|
1978
2041
|
projects_text.concat "
|
1979
2042
|
> Crash url: https://#{crash_hostname}" if deploy_crash?
|
1980
2043
|
projects_text.concat "
|
@@ -1991,42 +2054,46 @@ class Release
|
|
1991
2054
|
qainit_write_output(projects_text, 'Indirizzi scritti su ')
|
1992
2055
|
end
|
1993
2056
|
|
1994
|
-
def get_route53_hostname(
|
2057
|
+
def get_route53_hostname(project)
|
1995
2058
|
case
|
1996
|
-
when
|
2059
|
+
when project.include?('web')
|
1997
2060
|
host = "www-#{@dns_record_identifier}.qa.colaster.com"
|
1998
|
-
when
|
2061
|
+
when project.include?('urania')
|
1999
2062
|
host = "urania-#{@dns_record_identifier}.qa.colaster.com"
|
2000
|
-
when
|
2063
|
+
when project.include?('bburago')
|
2001
2064
|
host = "bburago-#{@dns_record_identifier}.qa.colaster.com"
|
2002
|
-
when
|
2065
|
+
when project.include?('hal9000')
|
2003
2066
|
host = "hal9000-#{@dns_record_identifier}.qa.colaster.com"
|
2004
|
-
when
|
2067
|
+
when project.include?('fidaty')
|
2005
2068
|
host = "fidaty-#{@dns_record_identifier}.qa.colaster.com"
|
2006
|
-
when
|
2069
|
+
when project.include?('peano')
|
2007
2070
|
host = "peano-#{@dns_record_identifier}.qa.colaster.com"
|
2008
|
-
when
|
2071
|
+
when project.include?('assange')
|
2009
2072
|
host = "assange-#{@dns_record_identifier}.qa.colaster.com"
|
2010
|
-
when
|
2073
|
+
when project.include?('borat')
|
2011
2074
|
host = "backoffice-#{@dns_record_identifier}.qa.colaster.com"
|
2012
|
-
when
|
2075
|
+
when project.include?('crash')
|
2013
2076
|
host = "crash-#{@dns_record_identifier}.qa.colaster.com"
|
2014
|
-
when
|
2077
|
+
when project.include?('ermes')
|
2015
2078
|
host = "ermes-#{@dns_record_identifier}.qa.colaster.com"
|
2016
|
-
when
|
2079
|
+
when project.include?('activia')
|
2017
2080
|
host = "activia-#{@dns_record_identifier}.qa.colaster.com"
|
2018
|
-
when
|
2081
|
+
when project.include?('skynet')
|
2019
2082
|
host = "skynet-#{@dns_record_identifier}.qa.colaster.com"
|
2020
|
-
when
|
2083
|
+
when project.include?('roger')
|
2021
2084
|
host = "roger-#{@dns_record_identifier}.qa.colaster.com"
|
2022
|
-
when
|
2085
|
+
when project.include?('leftorium')
|
2023
2086
|
host = "leftorium-#{@dns_record_identifier}.qa.colaster.com"
|
2024
|
-
when
|
2087
|
+
when project.include?('rachele')
|
2025
2088
|
host = "rachele-#{@dns_record_identifier}.qa.colaster.com"
|
2026
|
-
when
|
2089
|
+
when project.include?('starsky')
|
2027
2090
|
host = "starsky-#{@dns_record_identifier}.qa.colaster.com"
|
2028
|
-
when
|
2091
|
+
when project.include?('hutch')
|
2029
2092
|
host = "hutch-#{@dns_record_identifier}.qa.colaster.com"
|
2093
|
+
when project.include?('maia-app')
|
2094
|
+
host = "api-#{@dns_record_identifier}.qa.colaster.com"
|
2095
|
+
when project.include?('maia-intermediari')
|
2096
|
+
host = "api-intermediari-#{@dns_record_identifier}.qa.colaster.com"
|
2030
2097
|
end
|
2031
2098
|
host
|
2032
2099
|
end
|
@@ -2079,6 +2146,8 @@ class Release
|
|
2079
2146
|
logical_resource_id = 'EcsApplicationLoadBalancerPublic'
|
2080
2147
|
when stack_name.include?('hutch')
|
2081
2148
|
logical_resource_id = 'EcsApplicationLoadBalancerPublic'
|
2149
|
+
when stack_name.include?('maia')
|
2150
|
+
logical_resource_id = 'EcsApplicationLoadBalancerPublic'
|
2082
2151
|
end
|
2083
2152
|
resp = describe_stack_resource(stack_name, logical_resource_id)
|
2084
2153
|
resp = describe_load_balancers([resp.stack_resource_detail.physical_resource_id])
|
@@ -2127,6 +2196,8 @@ class Release
|
|
2127
2196
|
logical_resource_id = 'ECSServiceStarskyQA'
|
2128
2197
|
when stack_name.include?('hutch')
|
2129
2198
|
logical_resource_id = 'ECSServiceHutch'
|
2199
|
+
when stack_name.include?('maia')
|
2200
|
+
logical_resource_id = 'ECSServiceMaia'
|
2130
2201
|
else
|
2131
2202
|
raise "Service name non gestito per lo stack #{stack_name}"
|
2132
2203
|
end
|
@@ -2412,29 +2483,16 @@ class Release
|
|
2412
2483
|
|
2413
2484
|
Dir.chdir 'projects/hutch'
|
2414
2485
|
|
2415
|
-
version = `git rev-parse HEAD`
|
2416
|
-
|
2417
2486
|
decrypt_secrets() unless File.exist?('config/secrets.yml')
|
2418
2487
|
|
2419
|
-
exec_step 'git submodule update'
|
2420
2488
|
exec_step 'cp docker-compose-ci.yml docker-compose.yml'
|
2421
2489
|
exec_step 'prepare-docker-compose --directory hutch && cp docker-compose-qainit.yml docker-compose.yml'
|
2422
|
-
exec_step "sed s/qa_deploy_id/#{get_deploy_id}/ .env.dist.qa"
|
2423
|
-
exec_step "cp .env.dist.qa .env"
|
2424
|
-
exec_step "rm -fr peano"
|
2425
2490
|
|
2426
|
-
|
2427
|
-
"sed -i 's/USER app/USER root/g' Dockerfile",
|
2428
|
-
"docker-compose build web",
|
2429
|
-
"docker-compose run -w $PWD -u root -e ELM_APP_STARSKY_URL=https://#{get_route53_hostname("starsky")} --entrypoint /bin/sh web \
|
2430
|
-
'-c' 'yarn && yarn run build \
|
2431
|
-
&& tar cfz #{revision}-qa.tar.gz *'"
|
2432
|
-
].each do |cmd|
|
2433
|
-
execute_command cmd
|
2434
|
-
end
|
2491
|
+
execute_command "deploy/build_qa_artifact #{get_route53_hostname("maia-intermediari")}"
|
2435
2492
|
|
2436
|
-
|
2493
|
+
cleanup_containers
|
2437
2494
|
|
2495
|
+
artifact_path = "./hutch.tar.gz"
|
2438
2496
|
upload_artifact(artifact_path, "microservices/hutch/#{revision}-qa.tar.gz", "#{@s3_bucket}-encrypted")
|
2439
2497
|
|
2440
2498
|
Dir.chdir '../../'
|
@@ -2470,6 +2528,28 @@ class Release
|
|
2470
2528
|
Dir.chdir '../../'
|
2471
2529
|
end
|
2472
2530
|
|
2531
|
+
def create_maia_artifact(revision)
|
2532
|
+
output "Preparo l'artifact maia .zip\n".yellow
|
2533
|
+
|
2534
|
+
git_checkout_version('maia', revision)
|
2535
|
+
|
2536
|
+
Dir.chdir 'projects/maia'
|
2537
|
+
|
2538
|
+
decrypt_secrets()
|
2539
|
+
|
2540
|
+
exec_step 'cp docker-compose.yml docker-compose-ci.yml'
|
2541
|
+
exec_step 'prepare-docker-compose --directory maia && cp docker-compose-qainit.yml docker-compose.yml'
|
2542
|
+
|
2543
|
+
execute_command 'deploy/build_qa_artifact'
|
2544
|
+
|
2545
|
+
cleanup_containers
|
2546
|
+
|
2547
|
+
artifact_path = Dir.glob('_build/qa/rel/maia/releases/*/maia.tar.gz').first
|
2548
|
+
upload_artifact(artifact_path, "microservices/maia/#{revision}-qa.tar.gz", "#{@s3_bucket}-encrypted")
|
2549
|
+
|
2550
|
+
Dir.chdir '../../'
|
2551
|
+
end
|
2552
|
+
|
2473
2553
|
def create_peano_artifact(revision)
|
2474
2554
|
output "Preparo l'artifact peano .zip\n".yellow
|
2475
2555
|
|
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.58.
|
4
|
+
version: 0.58.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matteo Giachino
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
requirements: []
|
217
|
-
rubygems_version: 3.0.
|
217
|
+
rubygems_version: 3.0.3
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
220
|
summary: The Prima twig toolbelt
|