prima-twig 0.49.24 → 0.49.25
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 +14 -23
- 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: ba2bded5d91ca6482258e01903f536f018c60918654291b64741e7e7fa4bfaaf
|
4
|
+
data.tar.gz: 04fb07c99052aa77f56665062870ebeaa1258e4eebee0afce92ab4b6fb2dee2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 789cd3f4a3138e94403e7378167ed5ad9bb983a3ad1367a12e2b4b95a90276b735aa3a030425ec98ab5d904a93dd2b1b8e8628b86e50762024a7324685169161
|
7
|
+
data.tar.gz: 39fb013f24c8386f5c0d865ff1105d2db0021a6f2a4d6f0ece01c95e239c4f2044408ac1f19c755c07c4af7f74e29d18810ae3c34de9d4cc7199b1ffea547045
|
data/bin/twig-feature
CHANGED
@@ -15,13 +15,13 @@ class Release
|
|
15
15
|
|
16
16
|
def initialize(update_gem=true)
|
17
17
|
@prima = Prima.new
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
if update_gem
|
19
|
+
output 'Controllo se ci sono aggiornamenti da fare (potrebbe richiedere qualche minuto)'
|
20
|
+
unless `gem update prima-twig`=="Updating installed gems\nNothing to update\n"
|
21
|
+
output 'Gemma prima-twig aggiornata'
|
22
|
+
exec "twig feature #{ARGV.join ' '}"
|
23
|
+
end
|
24
|
+
end
|
25
25
|
@cf = Aws::CloudFormation::Client.new
|
26
26
|
@alb = Aws::ElasticLoadBalancingV2::Client.new
|
27
27
|
@ec2 = Aws::EC2::Client.new
|
@@ -939,7 +939,7 @@ class Release
|
|
939
939
|
create_stack(stack_name_db, stack_body, parameters, tags, @cf_role) unless stack_exists?(stack_name_db) # creazione asincrona stack dei db (~4 min)
|
940
940
|
|
941
941
|
output "check pyxis \n".yellow
|
942
|
-
create_pyxis_artifact(@projects["pyxis-npm"][:revision], deploy_id) if deploy_pyxis?
|
942
|
+
create_pyxis_artifact(@projects["pyxis-npm"][:revision], deploy_id) if deploy_pyxis? # deve essere creato prima di quello di prima, per avere la versione
|
943
943
|
create_prima_artifact(@projects["prima"][:revision], @projects["prima"][:name], deploy_id) unless artifact_exists?('prima-artifacts-encrypted', "prima/#{@projects["prima"][:revision]}.tar.gz")
|
944
944
|
# l'artefatto di prima viene creato sempre (puntamenti all'ambiente compilati nel js) e richiede molto più di 4 minuti
|
945
945
|
wait_for_stack_ready(stack_name_db) unless stack_ready?(stack_name_db) # dovrebbe essere istantaneo
|
@@ -2057,7 +2057,6 @@ class Release
|
|
2057
2057
|
end
|
2058
2058
|
|
2059
2059
|
def create_rachele_artifact(revision)
|
2060
|
-
output "messaggio di test"
|
2061
2060
|
output "Preparo l'artifact rachele .zip\n".yellow
|
2062
2061
|
|
2063
2062
|
git_checkout_version('rachele', revision)
|
@@ -2157,13 +2156,10 @@ class Release
|
|
2157
2156
|
end
|
2158
2157
|
|
2159
2158
|
def deploy_pyxis?
|
2160
|
-
|
2161
|
-
|
2162
|
-
|
2163
|
-
|
2164
|
-
else
|
2165
|
-
output 'pyxis non deve essere aggiornato'
|
2166
|
-
end
|
2159
|
+
exec_step "cd ../../projects/pyxis-npm"
|
2160
|
+
pyxis_updated = `git log -p -1 --unified=0 | grep pyxis-npm:`.length > 0
|
2161
|
+
exec_step "cd -"
|
2162
|
+
result = !@projects['pyxis-npm'].empty? && @projects['pyxis-npm'][:name] != 'master' && pyxis_updated
|
2167
2163
|
return result
|
2168
2164
|
end
|
2169
2165
|
|
@@ -2742,7 +2738,7 @@ class Release
|
|
2742
2738
|
exec_step 'mv docker-compose-ci.yml docker-compose.yml'
|
2743
2739
|
exec_step 'prepare-docker-compose --directory prima'
|
2744
2740
|
exec_step 'sed -i "s/\\/home\\/app/\\/root/g" docker-compose.yml'
|
2745
|
-
`sed -i 's/"@prima-assicurazioni/pyxis-npm": ".*",/"@prima-assicurazioni/pyxis-npm": "#{@pyxis_version}",/' package.json`
|
2741
|
+
`sed -i 's/"@prima-assicurazioni/pyxis-npm": ".*",/"@prima-assicurazioni/pyxis-npm": "#{@pyxis_version}",/' package.json` if deploy_pyxis?
|
2746
2742
|
[
|
2747
2743
|
"bin/qa_build_artifact.sh #{branch_name} #{'update' if @deploy_update}"
|
2748
2744
|
].each do |cmd|
|
@@ -2770,19 +2766,14 @@ class Release
|
|
2770
2766
|
|
2771
2767
|
decrypt_secrets()
|
2772
2768
|
|
2773
|
-
output `echo $NPM_TOKEN`
|
2774
2769
|
exec_step 'mv .fakenpmrc .npmrc'
|
2775
2770
|
exec_step 'cp docker-compose.yml docker-compose-ci.yml'
|
2776
2771
|
exec_step 'prepare-docker-compose --directory pyxis-npm && cp docker-compose-qainit.yml docker-compose.yml'
|
2777
2772
|
exec_step 'docker-compose build web'
|
2778
2773
|
|
2779
2774
|
exec_step "docker-compose run -w $PWD -u root -e NPM_TOKEN=$NPM_TOKEN --entrypoint /bin/sh web \
|
2780
|
-
'-c' 'npm view prima-assicurazioni/pyxis-npm versions --json > versions.json'"
|
2781
|
-
# execute_command 'npm view prima-assicurazioni/pyxis-npm versions --json'
|
2782
|
-
# published_versions = `npm view prima-assicurazioni/pyxis-npm versions --json`
|
2775
|
+
'-c' 'npm view prima-assicurazioni/pyxis-npm versions --json > versions.json'" # posso recuperare le versioni pubblicate solo da dentro al container, scrivo su un file che leggo subito dopo
|
2783
2776
|
published_versions = `cat versions.json`
|
2784
|
-
output "versioni: #{published_versions}"
|
2785
|
-
output "versione scelta #{get_pyxis_version(deploy_id)}"
|
2786
2777
|
qa_versions = JSON.parse(published_versions).select{ |version| version.include? get_pyxis_version(deploy_id) }
|
2787
2778
|
|
2788
2779
|
@pyxis_version = "0.#{get_pyxis_version(deploy_id)}.#{qa_versions.size}"
|