hybrid_platforms_conductor 32.16.1 → 32.16.2

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: f01de7476f9279e990b054d1b5709c1a549ea2a2069f3a12ace8b40d639451b0
4
- data.tar.gz: f6336d1668fe315ac99bd1268fc91514b1644663633a6299654808597d8d202b
3
+ metadata.gz: f78c78a80235a940f793af89344e6a972609f92d79ddce8acc6735b0e6b54ceb
4
+ data.tar.gz: 9c0bfef24e47646c61dd79899af40f33f063f90e73a626ed9c2617c7f7933593
5
5
  SHA512:
6
- metadata.gz: 5a931593af6eb20bf83eb478a2a438612dbcf3acf0f0e3cc93541c163b593a0aad88fd59f56340411d4cd95fe60618e58ae5ba845a44e42b0123394c93cab713
7
- data.tar.gz: 5708d46f33bbfa53a0ddd48607b23c93468b7cdb588ba1d969c997047944e89ff8303009f63c54438db02b23b8633b3fdef9989a49527fdcca812d1cf6ce8ddd
6
+ metadata.gz: 60a24969416d8d674cad078642e575c1b22e3b4457dcabb5a436bf62a597d13388bf042851008d5a3b01a7de82ee6003c6856b90821adddc1436bf2a0ecbfdd1
7
+ data.tar.gz: 83cdf6e30fefad4d1d97cb1e1af84278e71aff6eadac4fe5d27232f70d6537a35a48d0e30494213a616796177fd1e6aa36f26bc6ac86d313b651ca2023ade1a0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [v32.16.2](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v32.16.1...v32.16.2) (2021-06-01 09:52:22)
2
+
3
+ ## Global changes
4
+ ### Patches
5
+
6
+ * [[Hotfix(platform_handler_serverless_chef)] Fix Chef Workstation bash steps when run by root](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/1d99d1faa9cf66cd607eacc00205e312fd589715)
7
+
8
+ ## Changes for platform_handler_serverless_chef
9
+ ### Patches
10
+
11
+ * [[Hotfix(platform_handler_serverless_chef)] Fix Chef Workstation bash steps when run by root](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/1d99d1faa9cf66cd607eacc00205e312fd589715)
12
+
1
13
  # [v32.16.1](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v32.16.0...v32.16.1) (2021-06-01 09:21:47)
2
14
 
3
15
  ## Global changes
@@ -84,7 +84,7 @@ module HybridPlatformsConductor
84
84
  expected_match.nil? ? 'unreadable' : expected_match[1]
85
85
  end
86
86
  log_debug "Current Chef version: #{existing_version}. Required version: #{required_version}"
87
- @cmd_runner.run_cmd "curl -L https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chef-workstation -v #{required_version}" unless existing_version == required_version
87
+ @cmd_runner.run_cmd "curl -L https://omnitruck.chef.io/install.sh | #{@cmd_runner.root? ? '' : 'sudo '}bash -s -- -P chef-workstation -v #{required_version}" unless existing_version == required_version
88
88
  end
89
89
  end
90
90
 
@@ -178,7 +178,7 @@ module HybridPlatformsConductor
178
178
  @cmd_runner.run_cmd "cd #{@repository_path} && /opt/chef-workstation/bin/chef install #{policy_file}" unless File.exist?("#{@repository_path}/#{lock_file}")
179
179
  extra_cp_data_bags = File.exist?("#{@repository_path}/data_bags") ? " && cp -ar data_bags/ #{package_dir}/" : ''
180
180
  @cmd_runner.run_cmd "cd #{@repository_path} && \
181
- sudo rm -rf #{package_dir} && \
181
+ #{@cmd_runner.root? ? '' : 'sudo '}rm -rf #{package_dir} && \
182
182
  /opt/chef-workstation/bin/chef export #{policy_file} #{package_dir}#{extra_cp_data_bags}"
183
183
  end
184
184
  unless @cmd_runner.dry_run
@@ -236,7 +236,7 @@ module HybridPlatformsConductor
236
236
  client_options << '--why-run' if use_why_run
237
237
  if @nodes_handler.get_use_local_chef_of(node)
238
238
  # Just run the chef-client directly from the packaged repository
239
- [{ bash: "cd #{package_dir} && sudo SSL_CERT_DIR=/etc/ssl/certs /opt/chef-workstation/bin/chef-client #{client_options.join(' ')}" }]
239
+ [{ bash: "cd #{package_dir} && #{@cmd_runner.root? ? '' : 'sudo '}SSL_CERT_DIR=/etc/ssl/certs /opt/chef-workstation/bin/chef-client #{client_options.join(' ')}" }]
240
240
  else
241
241
  # Upload the package and run it from the node
242
242
  package_name = File.basename(package_dir)
@@ -112,7 +112,7 @@ module HybridPlatformsConductor
112
112
  # Result::
113
113
  # * String: The Podman command
114
114
  def podman_cmd
115
- @podman_cmd = @cmd_runner.root? ? 'podman' : 'sudo podman' unless defined?(@podman_cmd)
115
+ @podman_cmd = "#{@cmd_runner.root? ? '' : 'sudo '}podman" unless defined?(@podman_cmd)
116
116
  @podman_cmd
117
117
  end
118
118
 
@@ -1,5 +1,5 @@
1
1
  module HybridPlatformsConductor
2
2
 
3
- VERSION = '32.16.1'
3
+ VERSION = '32.16.2'
4
4
 
5
5
  end
@@ -44,6 +44,7 @@ describe HybridPlatformsConductor::HpcPlugins::PlatformHandler::ServerlessChef d
44
44
  end +
45
45
  if export
46
46
  [
47
+ ['whoami', proc { [0, 'test_user', ''] }, { optional: true }],
47
48
  [
48
49
  /^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)}#{data_bags ? " && cp -ar data_bags/ dist/#{Regexp.escape(env)}/#{Regexp.escape(policy)}/" : ''}$/,
49
50
  proc do
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: 32.16.1
4
+ version: 32.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan