prima-twig 0.31.27 → 0.31.28

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15d58488fd2bd1b8ace8507528e21c678ef199fe
4
- data.tar.gz: c5507c00ab0af3c27c68632c1c114b2526f3bf6a
3
+ metadata.gz: d8e32e181161c1c6ea43bdeaa274e1e44decae06
4
+ data.tar.gz: 48d46cbe8a53709228ba85c432eabce030b04ac3
5
5
  SHA512:
6
- metadata.gz: '0888937056a71663c941305db96cbc07c637e65d94ea46e7ab0ee991150138b82126a43ac76fd51347dd45d3b33235fddc8a4170c492a237fe32eff470b949d3'
7
- data.tar.gz: 491142c43b2f111685cdd48dfce54f875d65aa4ee285137466dd49ad072ba4cc4c1f41159c53b0185bf8b6c5d5c06b911aae0bd90e90687e366e03463f53a5b0
6
+ metadata.gz: 37ae5c577834ba80cb106168cf63b3f3a86fec4a5ae73507a7d4e9bf65ccefd66add28eff3b9c4d5076b7aab703753c5cf78d030562af7831c8884fbb1087077
7
+ data.tar.gz: a31c4c641285c2355d1672921b66254f10c5bd45c754a02b7df42322b1d077d0b21a13ded58757c571e7ebd2ca14b74e439fa4a75a71ed195c5ee87f82314f2e
data/bin/twig-feature CHANGED
@@ -477,7 +477,7 @@ class Release
477
477
  create_urania_artifact(@projects["urania"][:revision]) unless artifact_exists?('prima-artifacts', "microservices/urania/#{@projects["urania"][:revision]}-qa.tar.gz")
478
478
  create_ermes_artifact(@projects["ermes"][:revision]) unless artifact_exists?('prima-artifacts', "microservices/ermes/#{@projects["ermes"][:revision]}-qa.tar.gz")
479
479
  create_bburago_artifact(@projects["bburago"][:revision]) unless artifact_exists?('prima-artifacts', "microservices/bburago/#{@projects["bburago"][:revision]}-qa.tar.gz")
480
- create_hal9000_artifact(@projects["hal9000"][:revision]) unless artifact_exists?('prima-artifacts', "microservices/hal9000/#{@projects["hal9000"][:revision]}-qa.tar.gz")
480
+ create_hal9000_artifact(@projects["hal9000"][:revision]) unless artifact_exists?('prima-artifacts-encrypted', "microservices/hal9000/#{@projects["hal9000"][:revision]}-qa.tar.gz")
481
481
  create_fidaty_artifact(@projects["fidaty"][:revision], deploy_id) unless artifact_exists?('prima-artifacts', "microservices/fidaty/#{@projects["fidaty"][:revision]}-#{deploy_id}-qa.tar.gz")
482
482
  create_backoffice_artifact(@projects["backoffice"][:revision], deploy_id) unless artifact_exists?('prima-artifacts', "backoffice/#{@projects["backoffice"][:revision]}-#{deploy_id}.zip")
483
483
  create_peano_artifact(@projects["peano"][:revision]) unless artifact_exists?('prima-artifacts', "microservices/peano/#{@projects["peano"][:revision]}-qa.tar.gz")
@@ -1388,6 +1388,8 @@ class Release
1388
1388
 
1389
1389
  Dir.chdir 'projects/hal9000'
1390
1390
 
1391
+ decrypt_secrets()
1392
+
1391
1393
  [
1392
1394
  "docker-compose build web",
1393
1395
  "docker run -v $PWD:/code -w /code -e MIX_ENV=qa --entrypoint /bin/sh hal9000_web \
@@ -1401,7 +1403,7 @@ class Release
1401
1403
  end
1402
1404
 
1403
1405
  artifact_path = Dir.glob("_build/qa/rel/hal9000/releases/*/hal9000.tar.gz").first
1404
- upload_artifact(artifact_path, "microservices/hal9000/#{revision}-qa.tar.gz")
1406
+ upload_artifact(artifact_path, "microservices/hal9000/#{revision}-qa.tar.gz", "#{@s3_bucket}-encrypted")
1405
1407
 
1406
1408
  Dir.chdir '../../'
1407
1409
  end
@@ -1882,6 +1884,16 @@ class Release
1882
1884
  currently_deployed_version
1883
1885
  end
1884
1886
 
1887
+ def decrypt_secrets()
1888
+ docker_image = "prima/biscuit_populate_configs"
1889
+ [
1890
+ "docker pull #{docker_image}",
1891
+ "docker run -t --rm -v $HOME/.aws:/root/.aws -v $PWD:$PWD -w $PWD #{docker_image}"
1892
+ ].each do |cmd|
1893
+ execute_command cmd
1894
+ end
1895
+ end
1896
+
1885
1897
  def select_branches(project_name = nil)
1886
1898
  output "Deploy feature menu"
1887
1899
  if project_name.nil?
@@ -130,10 +130,12 @@ module PrimaAwsClient
130
130
  !resp.contents.empty?
131
131
  end
132
132
 
133
- def upload_artifact(source_path, destination_path)
133
+ def upload_artifact(source_path, destination_path, bucket_name_override=nil)
134
134
  output "Upload dell'artifact in corso (#{(File.size(source_path).to_f / 2**20).round(2)} MiB)\n".yellow
135
135
  s3 = Aws::S3::Resource.new
136
- obj = s3.bucket(@s3_bucket).object(destination_path)
136
+ s3_bucket = if !bucket_name_override.nil? then bucket_name_override else @s3_bucket end
137
+ puts s3_bucket
138
+ obj = s3.bucket(s3_bucket).object(destination_path)
137
139
  obj.upload_file(source_path)
138
140
 
139
141
  output "#{@s3_bucket}/#{destination_path} uploadato con successo!\n".green
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.31.27
4
+ version: 0.31.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Giachino
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2017-12-23 00:00:00.000000000 Z
16
+ date: 2018-01-04 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: aws-sdk