kitchen-habitat 0.5.1 → 0.5.2
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/lib/kitchen-habitat/version.rb +1 -1
- data/lib/kitchen/provisioner/habitat.rb +12 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22cabb87d4bfe8dd5c07c84632618eedbd36ccd4
|
|
4
|
+
data.tar.gz: 4350270701cffd61748c19e642e30873bb332fb9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 513e175d18554be67990460f7db27c9e8290e99b7a15033ea87b057d6b70ed6ad973afb2029d55c8ac273b594a88c28d56ca79b343d88a1a6ee95104bb9b0980
|
|
7
|
+
data.tar.gz: aa233a44754ebca04c5a1860f58adc296733f3243c792c2da6a612ff64c2530554236aac2197ad762662b30ff1d069f1c59ff4970b012397c9e835ed7ea02904
|
|
@@ -89,7 +89,11 @@ module Kitchen
|
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
def init_command
|
|
92
|
-
wrap_shell_code
|
|
92
|
+
wrap_shell_code <<-EOH
|
|
93
|
+
id -u hab >/dev/null 2>&1 || sudo useradd hab >/dev/null 2>&1
|
|
94
|
+
mkdir -p /tmp/kitchen/results
|
|
95
|
+
mkdir -p /tmp/kitchen/config
|
|
96
|
+
EOH
|
|
93
97
|
end
|
|
94
98
|
|
|
95
99
|
def create_sandbox
|
|
@@ -190,11 +194,16 @@ module Kitchen
|
|
|
190
194
|
File.join(File.join(config[:kitchen_root], config[:config_directory]), config[:user_toml_name])
|
|
191
195
|
end
|
|
192
196
|
|
|
197
|
+
def sandbox_user_toml_path
|
|
198
|
+
File.join(File.join(sandbox_path, "config"), "user.toml")
|
|
199
|
+
end
|
|
200
|
+
|
|
193
201
|
def copy_user_toml_to_sandbox
|
|
194
202
|
return if config[:config_directory].nil?
|
|
195
203
|
return unless File.exist?(full_user_toml_path)
|
|
196
204
|
FileUtils.mkdir_p(File.join(sandbox_path, "config"))
|
|
197
|
-
|
|
205
|
+
debug("Copying user.toml from #{full_user_toml_path} to #{sandbox_user_toml_path}")
|
|
206
|
+
FileUtils.cp(full_user_toml_path, sandbox_user_toml_path)
|
|
198
207
|
end
|
|
199
208
|
|
|
200
209
|
def install_service_package
|
|
@@ -205,6 +214,7 @@ module Kitchen
|
|
|
205
214
|
def copy_user_toml_to_service_directory
|
|
206
215
|
return unless !config[:config_directory].nil? && File.exist?(full_user_toml_path)
|
|
207
216
|
<<-EOH
|
|
217
|
+
sudo ls /tmp/kitchen
|
|
208
218
|
sudo mkdir -p /hab/svc/#{config[:package_name]}
|
|
209
219
|
sudo cp #{File.join(File.join(config[:root_path], 'config'), 'user.toml')} /hab/svc/#{config[:package_name]}/user.toml
|
|
210
220
|
EOH
|