hybrid_platforms_conductor 33.7.4 → 33.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8966575d336257c3b6aa9371ac750a69dcdff5e1817a84847cf9895348bddf4
4
- data.tar.gz: 065a1a3ff659e3d0a7c129884208a8299d378df383c57d67c0a6f2447464cefa
3
+ metadata.gz: 6cd97aeaa58547169eee76dd4605b3ee08b9188c718bbef6d3757186d7a6dfdc
4
+ data.tar.gz: e054326d38480c3480578b44e78c10f481e82b750486f5c1c8007ee2491731da
5
5
  SHA512:
6
- metadata.gz: 6f838436afdc89e284a0c6071b6fd06ef754361b615be00a8489f9d8991cdbb35546c19823035e677cfaaeff8cb3aac347cc005932dc3515a4578fdfccc7989d
7
- data.tar.gz: 1b544cf67be8b647cd07e8a37a59f448cde59f36a6711353b3b6c6b1264f4d5ec5bd6db0b77b409166e5062b4ffb613cf3ef54067c8c051513f3b7995c2c05aa
6
+ metadata.gz: d63c0cf64b6c5163ed7c1f6cb0c927c325d18c21dbf286b5dce91578f4fa5b4a1e6119b41ac877be20812b475306b3f7ab444474e482ebe36c0735b90c7ae9b7
7
+ data.tar.gz: 23cdf3242c78e993c3df565f1123eea67c5aca527218122e22a0ed1fcacfbf33adf3396aaebbdeb82666cbdf3e7ace44ecfd4a1c453e0fe8d38fc7d4064c7b89
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [v33.8.0](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.7.4...v33.8.0) (2021-08-04 15:55:54)
2
+
3
+ ## Global changes
4
+ ### Patches
5
+
6
+ * [[Feature(platform_handler_serverless_chef)] Integrate testadmin public key while deploying in local mode](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/6083463bf3bc760c393b786515db59af89315333)
7
+
8
+ ## Changes for platform_handler_serverless_chef
9
+ ### Features
10
+
11
+ * [[Feature(platform_handler_serverless_chef)] Integrate testadmin public key while deploying in local mode](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/6083463bf3bc760c393b786515db59af89315333)
12
+
1
13
  # [v33.7.4](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.7.3...v33.7.4) (2021-08-04 14:21:08)
2
14
 
3
15
  ## Global changes
@@ -190,6 +190,15 @@ module HybridPlatformsConductor
190
190
  secrets_file = "#{@repository_path}/#{package_dir}/data_bags/hpc_secrets/hpc_secrets.json"
191
191
  FileUtils.mkdir_p(File.dirname(secrets_file))
192
192
  File.write(secrets_file, secrets.merge(id: 'hpc_secrets').to_json)
193
+ # Make the testadmin public key available for deployment for hpc_test cookbook
194
+ testadmin_pub_key = "#{@config.hybrid_platforms_dir}/testadmin.key.pub"
195
+ if local_environment && File.exist?(testadmin_pub_key)
196
+ Dir.glob("#{@repository_path}/#{package_dir}/cookbook_artifacts/hpc_test-*") do |hpc_test_cookbook_path|
197
+ hpc_test_files_dir = "#{hpc_test_cookbook_path}/files/default"
198
+ FileUtils.mkdir_p hpc_test_files_dir
199
+ FileUtils.cp(testadmin_pub_key, "#{hpc_test_files_dir}/testadmin.key.pub")
200
+ end
201
+ end
193
202
  # Remember the package info
194
203
  File.write(package_info_file, package_info.to_json)
195
204
  end
@@ -1,5 +1,5 @@
1
1
  module HybridPlatformsConductor
2
2
 
3
- VERSION = '33.7.4'
3
+ VERSION = '33.8.0'
4
4
 
5
5
  end
@@ -51,6 +51,7 @@ describe HybridPlatformsConductor::HpcPlugins::PlatformHandler::ServerlessChef d
51
51
  [
52
52
  %r{^cd #{Regexp.escape(repository)} &&\s+sudo rm -rf dist/#{Regexp.escape(env)}/#{Regexp.escape(policy)} &&\s+/opt/chef-workstation/bin/chef export #{Regexp.escape(policy_file)} dist/#{Regexp.escape(env)}/#{Regexp.escape(policy)} --chef-license accept#{data_bags ? " && cp -ar data_bags/ dist/#{Regexp.escape(env)}/#{Regexp.escape(policy)}/" : ''}$},
53
53
  proc do
54
+ # Mock the packaging in the dist directory
54
55
  package_dir = "#{repository}/dist/#{env}/#{policy}"
55
56
  FileUtils.mkdir_p package_dir
56
57
  FileUtils.cp_r("#{repository}/data_bags", "#{package_dir}/") if data_bags
@@ -329,6 +330,25 @@ describe HybridPlatformsConductor::HpcPlugins::PlatformHandler::ServerlessChef d
329
330
  end
330
331
  end
331
332
 
333
+ it 'packages the repository with a testadmin public key' do
334
+ with_serverless_chef_platforms('hpc_test') do |platform, repository|
335
+ File.write("#{ENV['hpc_platforms']}/testadmin.key.pub", 'ssh-rsa 12345 testadmin@test.com')
336
+ with_packaging_mocked(
337
+ repository,
338
+ policy_file: 'policyfiles/test_policy.local.rb',
339
+ env: 'local',
340
+ cookbook_metadata: {
341
+ 'hpc_test-1234' => {}
342
+ }
343
+ ) do
344
+ platform.package(services: { 'node' => %w[test_policy] }, secrets: {}, local_environment: true)
345
+ testadmin_key_pub = Dir.glob("#{repository}/dist/local/test_policy/cookbook_artifacts/hpc_test-*/files/default/testadmin.key.pub").first
346
+ expect(testadmin_key_pub).not_to eq nil
347
+ expect(File.read(testadmin_key_pub)).to eq 'ssh-rsa 12345 testadmin@test.com'
348
+ end
349
+ end
350
+ end
351
+
332
352
  end
333
353
 
334
354
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hybrid_platforms_conductor
3
3
  version: !ruby/object:Gem::Version
4
- version: 33.7.4
4
+ version: 33.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan