prima-twig 0.45.13 → 0.45.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/twig-feature +111 -191
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c08b77998166bb2021a91adaa8cc9b8b56f63f1c
|
4
|
+
data.tar.gz: 3e2ef0e9b82a9920370832f0830b223ce10c2696
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f089c3e1ddd940b689adb055bf467cca5e58e72bbdcec4a2fc4a33de8bbdc1c8f3514d0d47d71b7c2c3195d1151c906bb886cf8407f0aabf8111a8cd360173d
|
7
|
+
data.tar.gz: a0cad5964713bb6d65050482fd908ac4bca17a8d7f6427ea94fcc8532800b98dfa8f3f762cf0247ef5880c8eb8bba28ffa60238b422e6ceb5ead7754435c640f
|
data/bin/twig-feature
CHANGED
@@ -467,7 +467,7 @@ class Release
|
|
467
467
|
end
|
468
468
|
|
469
469
|
def qainit_minimal_deploy!(project)
|
470
|
-
abort('
|
470
|
+
abort('L\'unico progetto permesso è prima') unless ['prima'].include? project
|
471
471
|
project_definition = choose_branch_to_deploy(project)
|
472
472
|
|
473
473
|
`git checkout master && git pull && git remote prune origin`
|
@@ -674,7 +674,7 @@ class Release
|
|
674
674
|
end
|
675
675
|
|
676
676
|
def qainit_drone_minimal_deploy!
|
677
|
-
# tenere solo il project da deployare (l'unico project è prima
|
677
|
+
# tenere solo il project da deployare (l'unico project è prima)
|
678
678
|
@ami_id = get_ami_id("ecs-fleet-allinone-staging")
|
679
679
|
project = ''
|
680
680
|
@projects.each_key do |project_key|
|
@@ -722,12 +722,7 @@ class Release
|
|
722
722
|
asg_stack_name = "ecs-asg-allinone-qa-#{deploy_id}"
|
723
723
|
create_asg_stack(asg_stack_name, tags) unless stack_exists?(asg_stack_name)
|
724
724
|
|
725
|
-
|
726
|
-
when 'prima'
|
727
|
-
create_prima_artifact(@projects["prima"][:revision], @projects["prima"][:name], true) unless artifact_exists?('prima-artifacts-encrypted', "prima/#{@projects["prima"][:revision]}.tar.gz")
|
728
|
-
when 'crash'
|
729
|
-
create_crash_artifact(@projects['crash'][:revision], deploy_id, true) unless artifact_exists?('prima-artifacts-encrypted', "microservices/crash/#{@projects['crash'][:revision]}-#{deploy_id}-qa.tar.gz")
|
730
|
-
end
|
725
|
+
create_prima_artifact(@projects["prima"][:revision], @projects["prima"][:name], true) unless artifact_exists?('prima-artifacts-encrypted', "prima/#{@projects["prima"][:revision]}.tar.gz")
|
731
726
|
|
732
727
|
wait_for_stack_ready(stack_name_alb) unless stack_ready?(stack_name_alb)
|
733
728
|
wait_for_stack_ready(stack_name_alb_ws) unless stack_ready?(stack_name_alb_ws)
|
@@ -752,136 +747,82 @@ class Release
|
|
752
747
|
create_stack(stack_name_route53, stack_body, parameters, tags, @cf_role) unless stack_exists?(stack_name_route53)
|
753
748
|
wait_for_stack_ready(stack_name_route53) unless stack_ready?(stack_name_route53)
|
754
749
|
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
{
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
{
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
{
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
{
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
{
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
{
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
{
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
{
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
update_service_defaults(stack_name_web)
|
826
|
-
prima_hostname = get_route53_hostname(stack_name_web)
|
750
|
+
stack_name_web = "ecs-task-web-qa-#{deploy_id}"
|
751
|
+
git_checkout_version('prima', @projects["prima"][:revision])
|
752
|
+
stack_body = IO.read('projects/prima/app/cloudformation/tasks/web.yml')
|
753
|
+
parameters = [
|
754
|
+
{
|
755
|
+
parameter_key: "Environment",
|
756
|
+
parameter_value: "qa-minimal"
|
757
|
+
},
|
758
|
+
{
|
759
|
+
parameter_key: "ReleaseVersion",
|
760
|
+
parameter_value: "#{@projects["prima"][:revision]}"
|
761
|
+
},
|
762
|
+
{
|
763
|
+
parameter_key: "TaskDesiredCount",
|
764
|
+
parameter_value: "1"
|
765
|
+
},
|
766
|
+
{
|
767
|
+
parameter_key: "ECSClusterName",
|
768
|
+
parameter_value: @ecs_cluster_name
|
769
|
+
},
|
770
|
+
{
|
771
|
+
parameter_key: "ALBShortName",
|
772
|
+
parameter_value: "web-qa-#{deploy_id}"[0..31]
|
773
|
+
},
|
774
|
+
{
|
775
|
+
parameter_key: "WebQaBaseHostname",
|
776
|
+
parameter_value: "#{@dns_record_identifier}.qa.colaster.com"
|
777
|
+
},
|
778
|
+
{
|
779
|
+
parameter_key: "HostnamePattern",
|
780
|
+
parameter_value: "ww*-#{@dns_record_identifier}.qa.colaster.com"
|
781
|
+
},
|
782
|
+
{
|
783
|
+
parameter_key: "HostnamePatternPriority",
|
784
|
+
parameter_value: hostname_pattern_priority
|
785
|
+
},
|
786
|
+
{
|
787
|
+
parameter_key: "HostnamePatternAggregatorPriority",
|
788
|
+
parameter_value: (hostname_pattern_priority.to_i + 1).to_s
|
789
|
+
},
|
790
|
+
{
|
791
|
+
parameter_key: "EnvHash",
|
792
|
+
parameter_value: deploy_id
|
793
|
+
},
|
794
|
+
{
|
795
|
+
parameter_key: "AssangeHostname",
|
796
|
+
parameter_value: "assange-#{@dns_record_identifier}.qa.colaster.com"
|
797
|
+
},
|
798
|
+
{
|
799
|
+
parameter_key: "BackofficeHostname",
|
800
|
+
parameter_value: "backoffice-#{@dns_record_identifier}.qa.colaster.com"
|
801
|
+
},
|
802
|
+
{
|
803
|
+
parameter_key: "WebHostname",
|
804
|
+
parameter_value: "www-#{@dns_record_identifier}.qa.colaster.com"
|
805
|
+
},
|
806
|
+
{
|
807
|
+
parameter_key: "WebRiHostname",
|
808
|
+
parameter_value: "wwwri-#{@dns_record_identifier}.qa.colaster.com"
|
809
|
+
}
|
810
|
+
]
|
811
|
+
if stack_exists?(stack_name_web)
|
812
|
+
cur_version = get_currently_deployed_version(stack_name_web)
|
813
|
+
update_stack(stack_name_web, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["prima"][:revision])
|
814
|
+
else
|
815
|
+
create_stack(stack_name_web, stack_body, parameters, tags, @cf_role)
|
816
|
+
end
|
817
|
+
wait_for_stack_ready(stack_name_web) unless stack_ready?(stack_name_web)
|
818
|
+
update_service_defaults(stack_name_web)
|
819
|
+
prima_hostname = get_route53_hostname(stack_name_web)
|
827
820
|
|
828
|
-
|
821
|
+
projects_text = "
|
829
822
|
> Prima url: https://#{prima_hostname}
|
830
823
|
> Prima RI url: https://#{prima_hostname.sub("www", "wwwri")}
|
831
824
|
> SSH connection: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no githubUsername@#{ec2_ip_address(asg_stack_name)}\n"
|
832
825
|
|
833
|
-
when 'crash'
|
834
|
-
git_checkout_version('crash', @projects['crash'][:revision])
|
835
|
-
stack_name_crash = "ecs-task-crash-qa-#{deploy_id}"
|
836
|
-
stack_body = IO.read('projects/crash/deploy/task.yml')
|
837
|
-
parameters = [
|
838
|
-
{
|
839
|
-
parameter_key: 'Environment',
|
840
|
-
parameter_value: 'staging'
|
841
|
-
},
|
842
|
-
{
|
843
|
-
parameter_key: 'ReleaseVersion',
|
844
|
-
parameter_value: "#{@projects['crash'][:revision]}-#{deploy_id}"
|
845
|
-
},
|
846
|
-
{
|
847
|
-
parameter_key: 'TaskDesiredCount',
|
848
|
-
parameter_value: '1'
|
849
|
-
},
|
850
|
-
{
|
851
|
-
parameter_key: 'ECSClusterName',
|
852
|
-
parameter_value: @ecs_cluster_name
|
853
|
-
},
|
854
|
-
{
|
855
|
-
parameter_key: 'ALBShortName',
|
856
|
-
parameter_value: "crash-qa-#{deploy_id}"[0..31]
|
857
|
-
},
|
858
|
-
{
|
859
|
-
parameter_key: 'HostnamePattern',
|
860
|
-
parameter_value: "crash-#{@dns_record_identifier}.qa.colaster.com"
|
861
|
-
},
|
862
|
-
{
|
863
|
-
parameter_key: 'HostnamePatternPriority',
|
864
|
-
parameter_value: (hostname_pattern_priority.to_i + 10).to_s
|
865
|
-
},
|
866
|
-
{
|
867
|
-
parameter_key: "HostnamePatternPartnersPriority",
|
868
|
-
parameter_value: (hostname_pattern_priority.to_i + 11).to_s
|
869
|
-
},
|
870
|
-
]
|
871
|
-
if stack_exists?(stack_name_crash)
|
872
|
-
cur_version = get_currently_deployed_version(stack_name_crash)
|
873
|
-
update_stack(stack_name_crash, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["crash"][:revision])
|
874
|
-
else
|
875
|
-
create_stack(stack_name_crash, stack_body, parameters, tags, @cf_role)
|
876
|
-
end
|
877
|
-
wait_for_stack_ready(stack_name_crash) unless stack_ready?(stack_name_crash)
|
878
|
-
update_service_defaults(stack_name_crash)
|
879
|
-
crash_hostname = get_route53_hostname(stack_name_crash)
|
880
|
-
projects_text = "
|
881
|
-
> Crash url: https://#{crash_hostname}
|
882
|
-
> SSH connection: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no githubUsername@#{ec2_ip_address(asg_stack_name)}\n"
|
883
|
-
end
|
884
|
-
|
885
826
|
output projects_text.cyan
|
886
827
|
output "Deploy effettuato, everything is awesome!\n".green
|
887
828
|
if @qainit
|
@@ -1005,7 +946,7 @@ class Release
|
|
1005
946
|
db_task = ''
|
1006
947
|
db_task = import_dbs(ec2_ip_address(asg_stack_name)) unless stack_exists?("ecs-route53-qa-#{deploy_id}") # import asincrono dei dati
|
1007
948
|
|
1008
|
-
create_crash_artifact(@projects['crash'][:revision], deploy_id) unless !deploy_crash? || artifact_exists?('prima-artifacts-encrypted', "microservices/crash/#{@projects['crash'][:revision]}
|
949
|
+
create_crash_artifact(@projects['crash'][:revision], deploy_id) unless !deploy_crash? || artifact_exists?('prima-artifacts-encrypted', "microservices/crash/#{@projects['crash'][:revision]}-qa.tar.gz")
|
1009
950
|
create_urania_artifact(@projects["urania"][:revision]) unless artifact_exists?('prima-artifacts-encrypted', "microservices/urania/#{@projects["urania"][:revision]}-qa.tar.gz")
|
1010
951
|
create_roger_artifact(@projects["roger"][:revision]) unless artifact_exists?('prima-artifacts-encrypted', "microservices/roger/#{@projects["roger"][:revision]}-qa.tar.gz")
|
1011
952
|
create_ermes_artifact(@projects["ermes"][:revision]) unless artifact_exists?('prima-artifacts-encrypted', "microservices/ermes/#{@projects["ermes"][:revision]}-qa.tar.gz")
|
@@ -1543,7 +1484,19 @@ class Release
|
|
1543
1484
|
{
|
1544
1485
|
parameter_key: "EnvHash",
|
1545
1486
|
parameter_value: deploy_id
|
1546
|
-
}
|
1487
|
+
},
|
1488
|
+
{
|
1489
|
+
parameter_key: "WsEndpoint",
|
1490
|
+
parameter_value: "wss://crash-#{@dns_record_identifier}.qa.colaster.com/socket/websocket?vsn=1.0.0"
|
1491
|
+
},
|
1492
|
+
{
|
1493
|
+
parameter_key: "GraphqlEndpoint",
|
1494
|
+
parameter_value: "https://crash-#{@dns_record_identifier}.qa.colaster.com/graphql"
|
1495
|
+
},
|
1496
|
+
{
|
1497
|
+
parameter_key: "AuthDomain",
|
1498
|
+
parameter_value: "https://www-#{@dns_record_identifier}.qa.colaster.com/"
|
1499
|
+
},
|
1547
1500
|
]
|
1548
1501
|
if stack_exists?(stack_name_crash)
|
1549
1502
|
cur_version = get_currently_deployed_version(stack_name_crash)
|
@@ -2071,69 +2024,38 @@ class Release
|
|
2071
2024
|
!@projects['crash'].empty? && @projects['crash'][:name] != 'master' && !@projects['crash'][:default_branch]
|
2072
2025
|
end
|
2073
2026
|
|
2074
|
-
def create_crash_artifact(revision, deploy_id
|
2027
|
+
def create_crash_artifact(revision, deploy_id)
|
2075
2028
|
output "Preparo l'artifact crash .zip\n".yellow
|
2076
2029
|
|
2077
2030
|
git_checkout_version('crash', revision)
|
2078
2031
|
|
2079
2032
|
Dir.chdir 'projects/crash'
|
2080
2033
|
|
2081
|
-
|
2082
|
-
web_qa_host = get_route53_hostname(stack_name_web)
|
2083
|
-
stack_name_crash = 'ecs-task-crash-qa-notneeded'
|
2084
|
-
crash_qa_host = get_route53_hostname(stack_name_crash)
|
2085
|
-
|
2086
|
-
ws_endpoint = "wss://#{crash_qa_host}/socket/websocket?vsn=1.0.0"
|
2087
|
-
frontend_endpoint = "https://#{crash_qa_host}/graphql"
|
2034
|
+
crash_qa_host = get_route53_hostname('ecs-task-crash-qa-notneeded')
|
2088
2035
|
|
2089
2036
|
decrypt_secrets()
|
2090
2037
|
|
2091
2038
|
if @qainit
|
2092
2039
|
`mv docker-compose-ci.yml docker-compose.yml`
|
2093
2040
|
exec_step 'prepare-docker-compose --directory crash && cp docker-compose-qainit.yml docker-compose.yml'
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
].each do |cmd|
|
2113
|
-
execute_command cmd
|
2114
|
-
end
|
2115
|
-
else
|
2116
|
-
[
|
2117
|
-
'docker-compose build web',
|
2118
|
-
"docker-compose run -w $PWD -u root -e WS_ENDPOINT=#{ws_endpoint} -e GRAPHQL_ENDPOINT=#{frontend_endpoint} -e MIX_ENV=qa -e ENV_HASH=#{deploy_id} -e HOSTNAME_PATTERN=https://#{crash_qa_host} web \
|
2119
|
-
'-c' 'sed -i \"s/web-qa-host/#{web_qa_host}/g\" config/qa.exs && \
|
2120
|
-
sed -i \"s/crash-qa-host/#{crash_qa_host}/g\" config/qa.exs && \
|
2121
|
-
mix local.hex --force && mix hex.info && \
|
2122
|
-
mix deps.get && \
|
2123
|
-
cd assets && \
|
2124
|
-
yarn --cache-folder ~/.cache/yarn && \
|
2125
|
-
./node_modules/.bin/elm-github-install && \
|
2126
|
-
NODE_ENV=production sysconfcpus -n 2 ./node_modules/.bin/webpack -p --config config/webpack.config.prod.js && \
|
2127
|
-
cd ../ && \
|
2128
|
-
mix release.clean --implode --no-confirm && \
|
2129
|
-
mix phx.digest && \
|
2130
|
-
mix deps.clean --all && \
|
2131
|
-
mix deps.get && \
|
2132
|
-
mix compile && mix release --env=qa'",
|
2133
|
-
'docker-compose down'
|
2134
|
-
].each do |cmd|
|
2135
|
-
execute_command cmd
|
2136
|
-
end
|
2041
|
+
[
|
2042
|
+
'docker-compose build web',
|
2043
|
+
"docker-compose run -w $PWD -u root -e MIX_ENV=qa -e ENV_HASH=#{deploy_id} web \
|
2044
|
+
'-c' 'mix local.hex --force && mix hex.info && \
|
2045
|
+
mix deps.get && \
|
2046
|
+
cd assets && \
|
2047
|
+
yarn --cache-folder ~/.cache/yarn && \
|
2048
|
+
./node_modules/.bin/elm-github-install && \
|
2049
|
+
NODE_ENV=production sysconfcpus -n 2 ./node_modules/.bin/webpack -p --config config/webpack.config.prod.js && \
|
2050
|
+
cd ../ && \
|
2051
|
+
mix release.clean --implode --no-confirm && \
|
2052
|
+
mix phx.digest && \
|
2053
|
+
mix deps.clean --all && \
|
2054
|
+
mix deps.get && \
|
2055
|
+
mix compile && mix release --env=qa'",
|
2056
|
+
'docker-compose down'
|
2057
|
+
].each do |cmd|
|
2058
|
+
execute_command cmd
|
2137
2059
|
end
|
2138
2060
|
|
2139
2061
|
cleanup_containers
|
@@ -2141,10 +2063,8 @@ class Release
|
|
2141
2063
|
[
|
2142
2064
|
'mv docker-compose-ci.yml docker-compose.yml',
|
2143
2065
|
'docker-compose build web',
|
2144
|
-
"docker-compose run -w $PWD -e
|
2145
|
-
'-c' '
|
2146
|
-
sed -i \"s/crash-qa-host/#{crash_qa_host}/g\" config/qa.exs && \
|
2147
|
-
mix local.hex --force && mix hex.info && \
|
2066
|
+
"docker-compose run -w $PWD -e ENV_HASH=#{deploy_id} -e MIX_ENV=qa web \
|
2067
|
+
'-c' 'mix local.hex --force && mix hex.info && \
|
2148
2068
|
mix deps.get && \
|
2149
2069
|
cd assets && \
|
2150
2070
|
yarn --cache-folder ~/.cache/yarn && \
|
@@ -2163,7 +2083,7 @@ class Release
|
|
2163
2083
|
end
|
2164
2084
|
|
2165
2085
|
artifact_path = Dir.glob('_build/qa/rel/crash/releases/*/crash.tar.gz').first
|
2166
|
-
upload_artifact(artifact_path, "microservices/crash/#{revision}
|
2086
|
+
upload_artifact(artifact_path, "microservices/crash/#{revision}-qa.tar.gz", "#{@s3_bucket}-encrypted")
|
2167
2087
|
|
2168
2088
|
Dir.chdir '../../'
|
2169
2089
|
end
|
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.45.
|
4
|
+
version: 0.45.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matteo Giachino
|
@@ -10,6 +10,7 @@ authors:
|
|
10
10
|
- Andrea Usuelli
|
11
11
|
- Simone Quaini
|
12
12
|
- Eugenio Laghi
|
13
|
+
- Giuseppe D'Anna
|
13
14
|
autorequire:
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
@@ -213,7 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
214
|
- !ruby/object:Gem::Version
|
214
215
|
version: '0'
|
215
216
|
requirements: []
|
216
|
-
|
217
|
+
rubyforge_project:
|
218
|
+
rubygems_version: 2.5.2.3
|
217
219
|
signing_key:
|
218
220
|
specification_version: 4
|
219
221
|
summary: The Prima twig toolbelt
|