chef-dk 0.17.17 → 0.18.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +11 -14
  3. data/Gemfile.lock +162 -139
  4. data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +0 -1
  5. data/acceptance/Gemfile.lock +73 -68
  6. data/chef-dk.gemspec +3 -9
  7. data/lib/chef-dk/command/clean_policy_cookbooks.rb +1 -2
  8. data/lib/chef-dk/command/clean_policy_revisions.rb +1 -1
  9. data/lib/chef-dk/command/delete_policy.rb +1 -1
  10. data/lib/chef-dk/command/delete_policy_group.rb +1 -1
  11. data/lib/chef-dk/command/export.rb +1 -1
  12. data/lib/chef-dk/command/generator_commands/build_cookbook.rb +11 -1
  13. data/lib/chef-dk/command/generator_commands/cookbook.rb +11 -2
  14. data/lib/chef-dk/command/install.rb +1 -1
  15. data/lib/chef-dk/command/push.rb +1 -1
  16. data/lib/chef-dk/command/push_archive.rb +1 -1
  17. data/lib/chef-dk/command/show_policy.rb +1 -1
  18. data/lib/chef-dk/command/undelete.rb +1 -1
  19. data/lib/chef-dk/command/update.rb +1 -1
  20. data/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/recipes/default.rb +1 -1
  21. data/lib/chef-dk/skeletons/code_generator/files/default/repo/data_bags/README.md +2 -2
  22. data/lib/chef-dk/skeletons/code_generator/files/default/repo/roles/README.md +1 -1
  23. data/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb +4 -3
  24. data/lib/chef-dk/skeletons/code_generator/templates/default/Policyfile.rb.erb +1 -1
  25. data/lib/chef-dk/version.rb +1 -1
  26. data/omnibus_overrides.rb +1 -2
  27. data/spec/unit/command/generator_commands/cookbook_spec.rb +5 -5
  28. data/spec/unit/command/generator_commands/policyfile_spec.rb +1 -1
  29. data/spec/unit/command/generator_commands/repo_spec.rb +1 -1
  30. data/tasks/dependencies.rb +2 -1
  31. data/tasks/version.rb +28 -3
  32. data/version_policy.rb +22 -22
  33. metadata +5 -11
@@ -14,7 +14,6 @@ driver:
14
14
  aws_ssh_key_id: <%= ENV['AWS_SSH_KEY_ID'] || ENV['USER'] || ENV['USERNAME'] %>
15
15
  # test-specific stuff
16
16
  region: us-west-2
17
- availability_zone: a
18
17
  subnet_id: subnet-19ac017c
19
18
  security_group_ids: ["sg-e401eb83", "sg-96274af3"]
20
19
  instance_type: m3.large
@@ -10,21 +10,19 @@ GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
12
  addressable (2.4.0)
13
- artifactory (2.3.3)
14
- aws-sdk (2.5.3)
15
- aws-sdk-resources (= 2.5.3)
16
- aws-sdk-core (2.5.3)
13
+ artifactory (2.5.0)
14
+ aws-sdk (2.6.2)
15
+ aws-sdk-resources (= 2.6.2)
16
+ aws-sdk-core (2.6.2)
17
17
  jmespath (~> 1.0)
18
- aws-sdk-resources (2.5.3)
19
- aws-sdk-core (= 2.5.3)
20
- berkshelf (4.3.5)
18
+ aws-sdk-resources (2.6.2)
19
+ aws-sdk-core (= 2.6.2)
20
+ berkshelf (5.1.0)
21
21
  addressable (~> 2.3, >= 2.3.4)
22
- berkshelf-api-client (~> 2.0, >= 2.0.2)
23
- buff-config (~> 1.0)
24
- buff-extensions (~> 1.0)
25
- buff-shell_out (~> 0.1)
26
- celluloid (= 0.16.0)
27
- celluloid-io (~> 0.16.1)
22
+ berkshelf-api-client (>= 2.0.2, < 4.0)
23
+ buff-config (~> 2.0)
24
+ buff-extensions (~> 2.0)
25
+ buff-shell_out (~> 1.0)
28
26
  cleanroom (~> 1.0)
29
27
  faraday (~> 0.9)
30
28
  httpclient (~> 2.7)
@@ -32,28 +30,29 @@ GEM
32
30
  mixlib-archive (~> 0.1)
33
31
  octokit (~> 4.0)
34
32
  retryable (~> 2.0)
35
- ridley (~> 4.5)
36
- solve (~> 2.0)
33
+ ridley (~> 5.0)
34
+ solve (> 2.0, < 4.0)
37
35
  thor (~> 0.19)
38
- berkshelf-api-client (2.0.2)
39
- faraday (~> 0.9.1)
40
- httpclient (~> 2.7.0)
41
- ridley (~> 4.5)
42
- buff-config (1.0.1)
43
- buff-extensions (~> 1.0)
44
- varia_model (~> 0.4)
45
- buff-extensions (1.0.0)
46
- buff-ignore (1.1.1)
47
- buff-ruby_engine (0.1.0)
48
- buff-shell_out (0.2.0)
49
- buff-ruby_engine (~> 0.1.0)
36
+ berkshelf-api-client (3.0.0)
37
+ faraday (~> 0.9)
38
+ httpclient (~> 2.7)
39
+ ridley (>= 4.5, < 6.0)
40
+ buff-config (2.0.0)
41
+ buff-extensions (~> 2.0)
42
+ varia_model (~> 0.6)
43
+ buff-extensions (2.0.0)
44
+ buff-ignore (1.2.0)
45
+ buff-ruby_engine (1.0.0)
46
+ buff-shell_out (1.1.0)
47
+ buff-ruby_engine (~> 1.0)
50
48
  builder (3.2.2)
51
49
  celluloid (0.16.0)
52
50
  timers (~> 4.0.0)
53
51
  celluloid-io (0.16.2)
54
52
  celluloid (>= 0.16.0)
55
53
  nio4r (>= 1.1.0)
56
- chef-config (12.13.30)
54
+ chef-config (12.14.77)
55
+ addressable
57
56
  fuzzyurl
58
57
  mixlib-config (~> 2.0)
59
58
  mixlib-shellout (~> 2.0)
@@ -64,7 +63,7 @@ GEM
64
63
  excon (>= 0.38.0)
65
64
  json
66
65
  erubis (2.7.0)
67
- excon (0.51.0)
66
+ excon (0.52.0)
68
67
  faraday (0.9.2)
69
68
  multipart-post (>= 1.2, < 3)
70
69
  ffi (1.9.14)
@@ -73,29 +72,32 @@ GEM
73
72
  ffi (>= 1.0.1)
74
73
  gyoku (1.3.1)
75
74
  builder (>= 2.1.2)
76
- hashie (3.4.4)
75
+ hashie (3.4.6)
77
76
  hitimes (1.2.4)
78
- httpclient (2.7.2)
79
- inspec (0.29.0)
77
+ httpclient (2.8.2.4)
78
+ inspec (0.35.0)
80
79
  hashie (~> 3.4)
81
- json (~> 1.8)
80
+ json (>= 1.8, < 3.0)
82
81
  method_source (~> 0.8)
82
+ mixlib-log
83
+ parallel (~> 1.9)
83
84
  pry (~> 0)
84
85
  rainbow (~> 2)
85
86
  rspec (~> 3)
86
87
  rspec-its (~> 1.2)
87
88
  rubyzip (~> 1.1)
89
+ sslshake (~> 1)
88
90
  thor (~> 0.19)
89
- train (>= 0.16.0, < 1.0)
91
+ train (>= 0.19.0, < 1.0)
90
92
  jmespath (1.3.1)
91
- json (1.8.3)
92
- kitchen-ec2 (1.1.0)
93
+ json (2.0.2)
94
+ kitchen-ec2 (1.2.0)
93
95
  aws-sdk (~> 2)
94
96
  excon
95
97
  multi_json
96
98
  retryable (~> 2.0)
97
99
  test-kitchen (~> 1.4, >= 1.4.1)
98
- kitchen-inspec (0.15.0)
100
+ kitchen-inspec (0.15.1)
99
101
  inspec (>= 0.22.0, < 1.0.0)
100
102
  test-kitchen (~> 1.6)
101
103
  kitchen-vagrant (0.20.0)
@@ -110,15 +112,15 @@ GEM
110
112
  mixlib-log
111
113
  mixlib-authentication (1.4.1)
112
114
  mixlib-log
113
- mixlib-config (2.2.1)
114
- mixlib-install (1.1.0)
115
+ mixlib-config (2.2.4)
116
+ mixlib-install (1.2.2)
115
117
  artifactory
116
118
  mixlib-shellout
117
119
  mixlib-versioning
118
120
  mixlib-log (1.7.1)
119
- mixlib-shellout (2.2.6)
121
+ mixlib-shellout (2.2.7)
120
122
  mixlib-versioning (1.1.0)
121
- molinillo (0.4.5)
123
+ molinillo (0.5.1)
122
124
  multi_json (1.12.1)
123
125
  multipart-post (2.0.0)
124
126
  net-scp (1.2.1)
@@ -130,18 +132,19 @@ GEM
130
132
  nori (2.6.0)
131
133
  octokit (4.3.0)
132
134
  sawyer (~> 0.7.0, >= 0.5.3)
135
+ parallel (1.9.0)
133
136
  pry (0.10.4)
134
137
  coderay (~> 1.1.0)
135
138
  method_source (~> 0.8.1)
136
139
  slop (~> 3.4)
137
140
  rainbow (2.1.0)
138
141
  retryable (2.0.4)
139
- ridley (4.6.1)
142
+ ridley (5.1.0)
140
143
  addressable
141
- buff-config (~> 1.0)
142
- buff-extensions (~> 1.0)
143
- buff-ignore (~> 1.1.1)
144
- buff-shell_out (~> 0.1)
144
+ buff-config (~> 2.0)
145
+ buff-extensions (~> 2.0)
146
+ buff-ignore (~> 1.2)
147
+ buff-shell_out (~> 1.0)
145
148
  celluloid (~> 0.16.0)
146
149
  celluloid-io (~> 0.16.1)
147
150
  chef-config (>= 12.5.0)
@@ -152,8 +155,8 @@ GEM
152
155
  json (>= 1.7.7)
153
156
  mixlib-authentication (>= 1.3.0)
154
157
  retryable (~> 2.0)
155
- semverse (~> 1.1)
156
- varia_model (~> 0.4.0)
158
+ semverse (~> 2.0)
159
+ varia_model (~> 0.6)
157
160
  rspec (3.4.0)
158
161
  rspec-core (~> 3.4.0)
159
162
  rspec-expectations (~> 3.4.0)
@@ -170,19 +173,20 @@ GEM
170
173
  diff-lcs (>= 1.2.0, < 2.0)
171
174
  rspec-support (~> 3.4.0)
172
175
  rspec-support (3.4.1)
173
- rubyntlm (0.6.0)
176
+ rubyntlm (0.6.1)
174
177
  rubyzip (1.2.0)
175
178
  safe_yaml (1.0.4)
176
179
  sawyer (0.7.0)
177
180
  addressable (>= 2.3.5, < 2.5)
178
181
  faraday (~> 0.8, < 0.10)
179
- semverse (1.2.1)
182
+ semverse (2.0.0)
180
183
  slop (3.6.0)
181
- solve (2.0.3)
182
- molinillo (~> 0.4.2)
183
- semverse (~> 1.1)
184
- test-kitchen (1.11.1)
185
- mixlib-install (~> 1.0, >= 1.0.4)
184
+ solve (3.0.1)
185
+ molinillo (~> 0.4)
186
+ semverse (>= 1.1, < 3.0)
187
+ sslshake (1.0.12)
188
+ test-kitchen (1.13.0)
189
+ mixlib-install (~> 1.2)
186
190
  mixlib-shellout (>= 1.2, < 3.0)
187
191
  net-scp (~> 1.1)
188
192
  net-ssh (>= 2.9, < 4.0)
@@ -192,35 +196,36 @@ GEM
192
196
  thor (0.19.1)
193
197
  timers (4.0.4)
194
198
  hitimes
195
- train (0.16.0)
199
+ train (0.20.0)
196
200
  docker-api (~> 1.26)
197
- json (~> 1.8)
201
+ json (>= 1.8, < 3.0)
198
202
  mixlib-shellout (~> 2.0)
199
203
  net-scp (~> 1.2)
200
204
  net-ssh (>= 2.9, < 4.0)
201
- winrm (~> 1.6)
202
- winrm-fs (~> 0.3)
203
- varia_model (0.4.1)
204
- buff-extensions (~> 1.0)
205
+ winrm (~> 2.0)
206
+ winrm-fs (~> 1.0)
207
+ varia_model (0.6.0)
208
+ buff-extensions (~> 2.0)
205
209
  hashie (>= 2.0.2, < 4.0.0)
206
210
  windows_chef_zero (2.0.0)
207
211
  test-kitchen (>= 1.2.1)
208
- winrm (1.8.1)
212
+ winrm (2.0.2)
209
213
  builder (>= 2.1.2)
214
+ erubis (~> 2.7)
210
215
  gssapi (~> 1.2)
211
216
  gyoku (~> 1.0)
212
217
  httpclient (~> 2.2, >= 2.2.0.2)
213
218
  logging (>= 1.6.1, < 3.0)
214
219
  nori (~> 2.0)
215
- rubyntlm (~> 0.6.0)
216
- winrm-elevated (0.4.0)
217
- winrm (~> 1.5)
218
- winrm-fs (~> 0.4.2)
219
- winrm-fs (0.4.3)
220
+ rubyntlm (~> 0.6.0, >= 0.6.1)
221
+ winrm-elevated (1.0.1)
222
+ winrm (~> 2.0)
223
+ winrm-fs (~> 1.0)
224
+ winrm-fs (1.0.0)
220
225
  erubis (~> 2.7)
221
226
  logging (>= 1.6.1, < 3.0)
222
227
  rubyzip (~> 1.1)
223
- winrm (~> 1.5)
228
+ winrm (~> 2.0)
224
229
 
225
230
  PLATFORMS
226
231
  ruby
@@ -28,7 +28,7 @@ Gem::Specification.new do |gem|
28
28
  gem.summary = gem.description
29
29
  gem.homepage = "https://www.chef.io/"
30
30
 
31
- gem.required_ruby_version = '>= 2.0'
31
+ gem.required_ruby_version = '>= 2.2'
32
32
 
33
33
  gem.files = %w{Rakefile LICENSE README.md CONTRIBUTING.md warning.txt} +
34
34
  %w{version_policy.rb omnibus_overrides.rb} +
@@ -42,19 +42,13 @@ Gem::Specification.new do |gem|
42
42
  gem.add_dependency "mixlib-cli", "~> 1.7"
43
43
  gem.add_dependency "mixlib-shellout", "~> 2.0"
44
44
  gem.add_dependency "ffi-yajl", ">= 1.0", "< 3.0"
45
-
46
45
  gem.add_dependency "minitar", "~> 0.5.4"
47
-
48
46
  gem.add_dependency "chef", "~> 12.5"
49
-
50
- gem.add_dependency "solve", "~> 2.0", ">= 2.0.1"
51
-
47
+ gem.add_dependency "solve", ">= 2.0.1"
52
48
  gem.add_dependency "cookbook-omnifetch", "~> 0.2", ">= 0.2.2"
53
-
54
49
  gem.add_dependency "diff-lcs", "~> 1.0"
55
50
  gem.add_dependency "paint", "~> 1.0"
56
-
57
- gem.add_dependency "chef-provisioning", "~> 1.2"
51
+ gem.add_dependency "chef-provisioning", "~> 2.0"
58
52
 
59
53
  gem.add_development_dependency "github_changelog_generator"
60
54
  gem.add_development_dependency "rake"
@@ -37,7 +37,7 @@ to remove orphaned policies before running this command.
37
37
 
38
38
  See our detailed README for more information:
39
39
 
40
- https://github.com/chef/chef-dk/blob/master/POLICYFILE_README.md
40
+ https://docs.chef.io/policyfile.html
41
41
 
42
42
  Options:
43
43
 
@@ -113,4 +113,3 @@ BANNER
113
113
  end
114
114
  end
115
115
  end
116
-
@@ -36,7 +36,7 @@ before deleting them, use `chef show-policy --orphans`.
36
36
 
37
37
  See our detailed README for more information:
38
38
 
39
- https://github.com/chef/chef-dk/blob/master/POLICYFILE_README.md
39
+ https://docs.chef.io/policyfile.html
40
40
 
41
41
  Options:
42
42
 
@@ -36,7 +36,7 @@ command.
36
36
 
37
37
  See our detailed README for more information:
38
38
 
39
- https://github.com/chef/chef-dk/blob/master/POLICYFILE_README.md
39
+ https://docs.chef.io/policyfile.html
40
40
 
41
41
  Options:
42
42
 
@@ -36,7 +36,7 @@ you to undo this operation via the `chef undelete` command.
36
36
 
37
37
  See our detailed README for more information:
38
38
 
39
- https://github.com/chef/chef-dk/blob/master/POLICYFILE_README.md
39
+ https://docs.chef.io/policyfile.html
40
40
 
41
41
  Options:
42
42
 
@@ -40,7 +40,7 @@ machine with:
40
40
 
41
41
  See our detailed README for more information:
42
42
 
43
- https://github.com/chef/chef-dk/blob/master/POLICYFILE_README.md
43
+ https://docs.chef.io/policyfile.html
44
44
 
45
45
  Options:
46
46
 
@@ -29,6 +29,11 @@ module ChefDK
29
29
 
30
30
  attr_reader :cookbook_name_or_path
31
31
 
32
+ option :pipeline,
33
+ :long => "--pipeline PIPELINE",
34
+ :description => "Use PIPELINE to set target branch to something other than master for the build_cookbook",
35
+ :default => "master"
36
+
32
37
  options.merge!(SharedGeneratorOptions.options)
33
38
 
34
39
  def initialize(params)
@@ -58,6 +63,12 @@ module ChefDK
58
63
 
59
64
  Generator.add_attr_to_context(:delivery_project_git_initialized, delivery_project_git_initialized?)
60
65
  Generator.add_attr_to_context(:build_cookbook_parent_is_cookbook, build_cookbook_parent_is_cookbook?)
66
+
67
+ Generator.add_attr_to_context(:pipeline, pipeline)
68
+ end
69
+
70
+ def pipeline
71
+ config[:pipeline]
61
72
  end
62
73
 
63
74
  def recipe
@@ -112,4 +123,3 @@ module ChefDK
112
123
  end
113
124
  end
114
125
  end
115
-
@@ -63,6 +63,11 @@ module ChefDK
63
63
  boolean: true,
64
64
  default: false
65
65
 
66
+ option :pipeline,
67
+ :long => "--pipeline PIPELINE",
68
+ :description => "Use PIPELINE to set target branch to something other than master for the build_cookbook",
69
+ :default => "master"
70
+
66
71
  options.merge!(SharedGeneratorOptions.options)
67
72
 
68
73
  def initialize(params)
@@ -125,6 +130,11 @@ module ChefDK
125
130
  Generator.add_attr_to_context(:verbose, verbose?)
126
131
 
127
132
  Generator.add_attr_to_context(:use_berkshelf, berks_mode?)
133
+ Generator.add_attr_to_context(:pipeline, pipeline)
134
+ end
135
+
136
+ def pipeline
137
+ config[:pipeline]
128
138
  end
129
139
 
130
140
  def policy_name
@@ -196,8 +206,7 @@ module ChefDK
196
206
  if !@cookbook_name_or_path
197
207
  @params_valid = false
198
208
  elsif /-/ =~ File.basename(@cookbook_name_or_path)
199
- err("Hyphens are not allowed in cookbook names. Please specify a cookbook name without hyphens.")
200
- @params_valid = false
209
+ msg("Hyphens are discouraged in cookbook names as they may cause problems with custom resources. See https://docs.chef.io/ctl_chef.html#chef-generate-cookbook for more information.")
201
210
  end
202
211
 
203
212
  if config[:berks] && config[:policy]
@@ -39,7 +39,7 @@ cookbooks to nodes in your infrastructure.
39
39
 
40
40
  See our detailed README for more information:
41
41
 
42
- https://github.com/chef/chef-dk/blob/master/POLICYFILE_README.md
42
+ https://docs.chef.io/policyfile.html
43
43
 
44
44
  Options:
45
45
 
@@ -37,7 +37,7 @@ run_list and cookbooks.
37
37
 
38
38
  See our detailed README for more information:
39
39
 
40
- https://github.com/chef/chef-dk/blob/master/POLICYFILE_README.md
40
+ https://docs.chef.io/policyfile.html
41
41
 
42
42
  Options:
43
43
 
@@ -37,7 +37,7 @@ run_list and cookbooks.
37
37
 
38
38
  For more information about Policyfiles, see our detailed README:
39
39
 
40
- https://github.com/chef/chef-dk/blob/master/POLICYFILE_README.md
40
+ https://docs.chef.io/policyfile.html
41
41
 
42
42
  Options:
43
43
  E
@@ -40,7 +40,7 @@ command.
40
40
 
41
41
  See our detailed README for more information:
42
42
 
43
- https://github.com/chef/chef-dk/blob/master/POLICYFILE_README.md
43
+ https://docs.chef.io/policyfile.html
44
44
 
45
45
  Options:
46
46