prima-twig 0.54.0 → 0.54.1
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 +100 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71d84cb616b21c1766e214127b0bf2c8f3a5a8a2dbe256321c0c0bab8d6dff72
|
4
|
+
data.tar.gz: 5aee79e7daf7313a1114d630e09322ca2c43e67983e95bde11ed15ebe7d5e562
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 536db877cf58d4367c6b3daeed200fbc7378a7c64d2fe82e8e06c1ff3c99b682ce08fd92ab357ec5094eb4e19362879da318c9177f11235e2c6995291df4cc3f
|
7
|
+
data.tar.gz: a2d82e38fbb35c3101df3c2d5f2c5c60a34b84f02ca15af6cc11a81875307c591a19472f121350893ee77cbb9183b6338c5825c511036b7ab84ae5ac4697aac0
|
data/bin/twig-feature
CHANGED
@@ -57,7 +57,8 @@ class Release
|
|
57
57
|
'rachele' => {},
|
58
58
|
'leftorium' => {},
|
59
59
|
'pyxis-npm' => {},
|
60
|
-
'starsky' => {}
|
60
|
+
'starsky' => {},
|
61
|
+
'hutch' => {}
|
61
62
|
}
|
62
63
|
@base_stack_name_alb = 'ecs-alb-http-public-qa-'
|
63
64
|
@base_stack_name_alb_ws = 'ecs-alb-ws-public-qa-'
|
@@ -972,6 +973,7 @@ class Release
|
|
972
973
|
create_leftorium_artifact(@projects["leftorium"][:revision]) unless artifact_exists?('prima-artifacts-encrypted', "microservices/leftorium/#{@projects["leftorium"][:revision]}-qa.tar.gz")
|
973
974
|
create_skynet_artifact(@projects["skynet"][:revision]) unless artifact_exists?('prima-artifacts-encrypted', "microservices/skynet/#{@projects["skynet"][:revision]}-qa.tar.gz")
|
974
975
|
create_starsky_artifact(@projects["starsky"][:revision]) unless !deploy_starsky_hutch? || artifact_exists?('prima-artifacts-encrypted', "microservices/starsky/#{@projects["starsky"][:revision]}-qa.tar.gz")
|
976
|
+
create_hutch_artifact(@projects["hutch"][:revision]) unless !deploy_starsky_hutch? || artifact_exists?('prima-artifacts-encrypted', "microservices/hutch/#{@projects["hutch"][:revision]}-qa.tar.gz")
|
975
977
|
|
976
978
|
wait_for_db_import(db_task) unless stack_exists?("ecs-route53-qa-#{deploy_id}") # dovrebbe essere istantaneo
|
977
979
|
|
@@ -1054,6 +1056,10 @@ class Release
|
|
1054
1056
|
{
|
1055
1057
|
parameter_key: 'StarskyElbHostname',
|
1056
1058
|
parameter_value: get_alb_host(stack_name_alb)
|
1059
|
+
},
|
1060
|
+
{
|
1061
|
+
parameter_key: 'HutchElbHostname',
|
1062
|
+
parameter_value: get_alb_host(stack_name_alb)
|
1057
1063
|
}
|
1058
1064
|
]
|
1059
1065
|
|
@@ -1846,6 +1852,52 @@ class Release
|
|
1846
1852
|
create_stack(stack_name_roger, stack_body, parameters, tags, @cf_role)
|
1847
1853
|
end
|
1848
1854
|
|
1855
|
+
wait_for_stack_ready(stack_name_starsky) unless stack_ready?(stack_name_starsky) unless !deploy_starsky_hutch?
|
1856
|
+
|
1857
|
+
stack_name_hutch = "ecs-task-hutch-qa-#{deploy_id}"
|
1858
|
+
git_checkout_version('hutch', @projects["hutch"][:revision])
|
1859
|
+
stack_body = File.read('projects/hutch/deploy/task.yml')
|
1860
|
+
parameters = [
|
1861
|
+
{
|
1862
|
+
parameter_key: "Environment",
|
1863
|
+
parameter_value: "qa"
|
1864
|
+
},
|
1865
|
+
{
|
1866
|
+
parameter_key: "ReleaseVersion",
|
1867
|
+
parameter_value: "#{@projects["hutch"][:revision]}"
|
1868
|
+
},
|
1869
|
+
{
|
1870
|
+
parameter_key: "ALBShortName",
|
1871
|
+
parameter_value: "hutch-qa-#{deploy_id}"[0..27]
|
1872
|
+
},
|
1873
|
+
{
|
1874
|
+
parameter_key: "ECSClusterName",
|
1875
|
+
parameter_value: @ecs_cluster_name
|
1876
|
+
},
|
1877
|
+
{
|
1878
|
+
parameter_key: "EnvHash",
|
1879
|
+
parameter_value: deploy_id
|
1880
|
+
},
|
1881
|
+
{
|
1882
|
+
parameter_key: "HostnamePattern",
|
1883
|
+
parameter_value: "hutch-#{@dns_record_identifier}.qa.colaster.com"
|
1884
|
+
},
|
1885
|
+
{
|
1886
|
+
parameter_key: "HostnamePatternPriority",
|
1887
|
+
parameter_value: (hostname_pattern_priority.to_i + 254).to_s
|
1888
|
+
},
|
1889
|
+
{
|
1890
|
+
parameter_key: "StarskyUrl",
|
1891
|
+
parameter_value: get_route53_hostname('ecs-task-starsky-qa-notneeded')
|
1892
|
+
}
|
1893
|
+
]
|
1894
|
+
if stack_exists?(stack_name_hutch)
|
1895
|
+
cur_version = get_currently_deployed_version(stack_name_hutch)
|
1896
|
+
update_stack(stack_name_hutch, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["hutch"][:revision])
|
1897
|
+
else
|
1898
|
+
create_stack(stack_name_hutch, stack_body, parameters, tags, @cf_role)
|
1899
|
+
end
|
1900
|
+
|
1849
1901
|
wait_for_stack_ready(stack_name_web) unless stack_ready?(stack_name_web)
|
1850
1902
|
wait_for_stack_ready(stack_name_consumer) unless stack_ready?(stack_name_consumer)
|
1851
1903
|
wait_for_stack_ready(stack_name_ermes) unless stack_ready?(stack_name_ermes)
|
@@ -1855,7 +1907,7 @@ class Release
|
|
1855
1907
|
wait_for_stack_ready(stack_name_borat) unless stack_ready?(stack_name_borat)
|
1856
1908
|
wait_for_stack_ready(stack_name_activia) unless stack_ready?(stack_name_activia)
|
1857
1909
|
wait_for_stack_ready(stack_name_crash) unless stack_ready?(stack_name_crash) unless !deploy_crash?
|
1858
|
-
wait_for_stack_ready(
|
1910
|
+
wait_for_stack_ready(stack_name_hutch) unless stack_ready?(stack_name_hutch) unless !deploy_starsky_hutch?
|
1859
1911
|
|
1860
1912
|
update_service_defaults(stack_name_web)
|
1861
1913
|
update_service_defaults(stack_name_consumer)
|
@@ -1873,6 +1925,7 @@ class Release
|
|
1873
1925
|
update_service_defaults(stack_name_leftorium)
|
1874
1926
|
update_service_defaults(stack_name_rachele)
|
1875
1927
|
update_service_defaults(stack_name_starsky) unless !deploy_starsky_hutch?
|
1928
|
+
update_service_defaults(stack_name_hutch) unless !deploy_starsky_hutch?
|
1876
1929
|
update_service_defaults(stack_name_crash) unless !deploy_crash?
|
1877
1930
|
|
1878
1931
|
activia_hostname = get_route53_hostname(stack_name_activia)
|
@@ -1891,6 +1944,7 @@ class Release
|
|
1891
1944
|
rachele_hostname = get_route53_hostname(stack_name_rachele)
|
1892
1945
|
crash_hostname = get_route53_hostname(stack_name_crash) unless !deploy_crash?
|
1893
1946
|
starsky_hostname = get_route53_hostname(stack_name_starsky) unless !deploy_starsky_hutch?
|
1947
|
+
hutch_hostname = get_route53_hostname(stack_name_hutch) unless !deploy_starsky_hutch?
|
1894
1948
|
|
1895
1949
|
# launch_marley ec2_ip_address(asg_stack_name), prima_hostname, borat_hostname
|
1896
1950
|
|
@@ -1912,7 +1966,8 @@ class Release
|
|
1912
1966
|
projects_text.concat "
|
1913
1967
|
> Crash url: https://#{crash_hostname}" if deploy_crash?
|
1914
1968
|
projects_text.concat "
|
1915
|
-
> Starsky url: https://#{starsky_hostname}
|
1969
|
+
> Starsky url: https://#{starsky_hostname}
|
1970
|
+
> Hutch url: https://#{hutch_hostname}" if deploy_starsky_hutch?
|
1916
1971
|
projects_text.concat "
|
1917
1972
|
> RabbitMQ url: http://#{ec2_ip_address(asg_stack_name)}:15672
|
1918
1973
|
> Supervisor url: http://#{ec2_ip_address(asg_stack_name)}:9001
|
@@ -1958,6 +2013,8 @@ class Release
|
|
1958
2013
|
host = "rachele-#{@dns_record_identifier}.qa.colaster.com"
|
1959
2014
|
when stack_name.include?('starsky')
|
1960
2015
|
host = "starsky-#{@dns_record_identifier}.qa.colaster.com"
|
2016
|
+
when stack_name.include?('hutch')
|
2017
|
+
host = "hutch-#{@dns_record_identifier}.qa.colaster.com"
|
1961
2018
|
end
|
1962
2019
|
host
|
1963
2020
|
end
|
@@ -2014,6 +2071,8 @@ class Release
|
|
2014
2071
|
logical_resource_id = 'EcsApplicationLoadBalancerInternal'
|
2015
2072
|
when stack_name.include?('starsky')
|
2016
2073
|
logical_resource_id = 'EcsApplicationLoadBalancerPublic'
|
2074
|
+
when stack_name.include?('hutch')
|
2075
|
+
logical_resource_id = 'EcsApplicationLoadBalancerPublic'
|
2017
2076
|
end
|
2018
2077
|
resp = @cf.describe_stack_resource({
|
2019
2078
|
stack_name: stack_name,
|
@@ -2065,6 +2124,8 @@ class Release
|
|
2065
2124
|
logical_resource_id = 'ECSServiceCrashQA'
|
2066
2125
|
when stack_name.include?('starsky')
|
2067
2126
|
logical_resource_id = 'ECSServiceStarskyQA'
|
2127
|
+
when stack_name.include?('hutch')
|
2128
|
+
logical_resource_id = 'ECSServiceHutch'
|
2068
2129
|
else
|
2069
2130
|
raise "Service name non gestito per lo stack #{stack_name}"
|
2070
2131
|
end
|
@@ -2357,6 +2418,40 @@ class Release
|
|
2357
2418
|
Dir.chdir '../../'
|
2358
2419
|
end
|
2359
2420
|
|
2421
|
+
def create_hutch_artifact(revision)
|
2422
|
+
output "Preparo l'artifact hutch\n".yellow
|
2423
|
+
|
2424
|
+
git_checkout_version('hutch', revision)
|
2425
|
+
|
2426
|
+
Dir.chdir 'projects/hutch'
|
2427
|
+
|
2428
|
+
version = `git rev-parse HEAD`
|
2429
|
+
|
2430
|
+
decrypt_secrets() unless File.exist?('config/secrets.yml')
|
2431
|
+
|
2432
|
+
exec_step 'cp docker-compose-ci.yml docker-compose.yml'
|
2433
|
+
exec_step 'prepare-docker-compose --directory hutch && cp docker-compose-qainit.yml docker-compose.yml'
|
2434
|
+
exec_step "sed s/qa_deploy_id/#{get_deploy_id}/ .env.dist.qa"
|
2435
|
+
exec_step "cp .env.dist.qa .env"
|
2436
|
+
exec_step "rm -fr peano"
|
2437
|
+
|
2438
|
+
[
|
2439
|
+
"sed -i 's/USER app/USER root/g' Dockerfile",
|
2440
|
+
"docker-compose build web",
|
2441
|
+
"docker-compose run -w $PWD -u root -e ELM_APP_STARSKY_URL=https://#{get_route53_hostname("starsky")} --entrypoint /bin/sh web \
|
2442
|
+
'-c' 'yarn && yarn run build \
|
2443
|
+
&& tar cfz #{revision}-qa.tar.gz *'"
|
2444
|
+
].each do |cmd|
|
2445
|
+
execute_command cmd
|
2446
|
+
end
|
2447
|
+
|
2448
|
+
artifact_path = "./#{revision}-qa.tar.gz"
|
2449
|
+
|
2450
|
+
upload_artifact(artifact_path, "microservices/hutch/#{revision}-qa.tar.gz", "#{@s3_bucket}-encrypted")
|
2451
|
+
|
2452
|
+
Dir.chdir '../../'
|
2453
|
+
end
|
2454
|
+
|
2360
2455
|
def create_leftorium_artifact(revision)
|
2361
2456
|
output "Preparo l'artifact leftorium .zip\n".yellow
|
2362
2457
|
|
@@ -2686,8 +2781,8 @@ class Release
|
|
2686
2781
|
|
2687
2782
|
def deploy_starsky_hutch?
|
2688
2783
|
starsky_present = !@projects['starsky'].nil? && !@projects['starsky'].empty? && @projects['starsky'][:name] != 'master' && !@projects['starsky'][:default_branch]
|
2689
|
-
|
2690
|
-
starsky_present
|
2784
|
+
hutch_present = !@projects['hutch'].nil? &&!@projects['hutch'].empty? && @projects['hutch'][:name] != 'master' && !@projects['hutch'][:default_branch]
|
2785
|
+
starsky_present || hutch_present
|
2691
2786
|
end
|
2692
2787
|
|
2693
2788
|
def get_pyxis_version(deploy_id)
|