kitchen-habitat 0.11.1 → 0.11.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: 829dec57fdb189dcd37c2d5ec649ab0d0efed8584f5e2c711f171b21610fc9ec
4
- data.tar.gz: ca4c16b4dcd0d6bc49c98dd8f4f0b5d888aafc954cd143e9f9e992b9ed7d4622
3
+ metadata.gz: 2f0dff2a5f968980869f7997e70646b270bb317dd75fb7728826f0a71be9d94b
4
+ data.tar.gz: 97695db2914a4b22dcc172323fa2d73679ac1e629d226868191f0889bf3f7642
5
5
  SHA512:
6
- metadata.gz: a87b899607aa31a5a497b82310de421621f272a1c6e08c40d25afa6fba77cc420671d067024d9545fe6ecab5b469e43a5a72890a1001632a795b9871800ff35d
7
- data.tar.gz: 41bbd702a57ee8ec7758f51bed075dd5e5060ff6aae46f9c8da361d77cb9231d92172756752fbd4948f11528839774bb43b7bcd6de44bb0fe9c5ff9160d15e32
6
+ metadata.gz: 3f2aa27e5149b48e593eee823b9bc3743e463733f2a22dfd5781ee6bf98becb769dcf46aa00bc177e6ac4a119c8e120120f674cbe103ae0fb8bcb71159817a6a
7
+ data.tar.gz: e226dca41ef127b60d02430b571189c845d642a747fe207a6e9fbc83b78b2c4dc1213111a6924bb0595e7f69ab72b27ed013d39385322cf477c2d3b83e598931
data/README.md CHANGED
@@ -11,6 +11,9 @@ You'll need the test-kitchen & kitchen-habitat gems installed in your system, al
11
11
 
12
12
  ## Configuration Settings
13
13
 
14
+ * `hab_license`: Habitat license acceptance type (for more information please read the [chef license documentation](https://docs.chef.io/chef_license_accept.html#habitat)).
15
+ * `hab_version`: The version of habitat to be used in test kitchen.
16
+
14
17
  ### Depot settings
15
18
 
16
19
  * `depot_url`
@@ -1,5 +1,5 @@
1
1
  module Kitchen
2
2
  module Habitat
3
- VERSION = "0.11.1".freeze
3
+ VERSION = "0.11.2".freeze
4
4
  end
5
5
  end
@@ -17,6 +17,7 @@ module Kitchen
17
17
  kitchen_provisioner_api_version 2
18
18
 
19
19
  default_config :depot_url, nil
20
+ default_config :hab_license, nil
20
21
  default_config :hab_version, "latest"
21
22
  default_config :hab_sup_origin, "core"
22
23
  default_config :hab_sup_name, "hab-sup"
@@ -84,6 +85,7 @@ module Kitchen
84
85
 
85
86
  wrap_shell_code <<-BASH
86
87
  #{export_hab_bldr_url}
88
+ #{export_hab_license}
87
89
  if command -v hab >/dev/null 2>&1
88
90
  then
89
91
  echo "Habitat CLI already installed."
@@ -113,6 +115,7 @@ module Kitchen
113
115
  def prepare_command
114
116
  wrap_shell_code <<-EOH
115
117
  #{export_hab_bldr_url}
118
+ #{export_hab_license}
116
119
  #{install_supervisor_command}
117
120
  #{binlink_supervisor_command}
118
121
  #{install_service_package}
@@ -124,6 +127,7 @@ module Kitchen
124
127
  def run_command
125
128
  run = <<-RUN
126
129
  #{export_hab_bldr_url}
130
+ #{export_hab_license}
127
131
  #{clean_up_screen_sessions}
128
132
  #{clean_up_previous_supervisor}
129
133
  echo "Running #{package_ident}."
@@ -320,6 +324,12 @@ module Kitchen
320
324
  "export HAB_BLDR_URL=#{config[:depot_url]}"
321
325
  end
322
326
 
327
+ def export_hab_license
328
+ return if config[:hab_license].nil?
329
+
330
+ "export HAB_LICENSE=#{config[:hab_license]}"
331
+ end
332
+
323
333
  def install_supervisor_command
324
334
  "sudo -E hab pkg install #{hab_sup_ident}"
325
335
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-habitat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Murawski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-13 00:00:00.000000000 Z
11
+ date: 2019-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen