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.
- checksums.yaml +4 -4
- data/Gemfile +11 -14
- data/Gemfile.lock +162 -139
- data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +0 -1
- data/acceptance/Gemfile.lock +73 -68
- data/chef-dk.gemspec +3 -9
- data/lib/chef-dk/command/clean_policy_cookbooks.rb +1 -2
- data/lib/chef-dk/command/clean_policy_revisions.rb +1 -1
- data/lib/chef-dk/command/delete_policy.rb +1 -1
- data/lib/chef-dk/command/delete_policy_group.rb +1 -1
- data/lib/chef-dk/command/export.rb +1 -1
- data/lib/chef-dk/command/generator_commands/build_cookbook.rb +11 -1
- data/lib/chef-dk/command/generator_commands/cookbook.rb +11 -2
- data/lib/chef-dk/command/install.rb +1 -1
- data/lib/chef-dk/command/push.rb +1 -1
- data/lib/chef-dk/command/push_archive.rb +1 -1
- data/lib/chef-dk/command/show_policy.rb +1 -1
- data/lib/chef-dk/command/undelete.rb +1 -1
- data/lib/chef-dk/command/update.rb +1 -1
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/recipes/default.rb +1 -1
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/data_bags/README.md +2 -2
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/roles/README.md +1 -1
- data/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb +4 -3
- data/lib/chef-dk/skeletons/code_generator/templates/default/Policyfile.rb.erb +1 -1
- data/lib/chef-dk/version.rb +1 -1
- data/omnibus_overrides.rb +1 -2
- data/spec/unit/command/generator_commands/cookbook_spec.rb +5 -5
- data/spec/unit/command/generator_commands/policyfile_spec.rb +1 -1
- data/spec/unit/command/generator_commands/repo_spec.rb +1 -1
- data/tasks/dependencies.rb +2 -1
- data/tasks/version.rb +28 -3
- data/version_policy.rb +22 -22
- 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
|
data/acceptance/Gemfile.lock
CHANGED
@@ -10,21 +10,19 @@ GEM
|
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
12
|
addressable (2.4.0)
|
13
|
-
artifactory (2.
|
14
|
-
aws-sdk (2.
|
15
|
-
aws-sdk-resources (= 2.
|
16
|
-
aws-sdk-core (2.
|
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.
|
19
|
-
aws-sdk-core (= 2.
|
20
|
-
berkshelf (
|
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 (
|
23
|
-
buff-config (~>
|
24
|
-
buff-extensions (~>
|
25
|
-
buff-shell_out (~> 0
|
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 (~>
|
36
|
-
solve (
|
33
|
+
ridley (~> 5.0)
|
34
|
+
solve (> 2.0, < 4.0)
|
37
35
|
thor (~> 0.19)
|
38
|
-
berkshelf-api-client (
|
39
|
-
faraday (~> 0.9
|
40
|
-
httpclient (~> 2.7
|
41
|
-
ridley (
|
42
|
-
buff-config (
|
43
|
-
buff-extensions (~>
|
44
|
-
varia_model (~> 0.
|
45
|
-
buff-extensions (
|
46
|
-
buff-ignore (1.
|
47
|
-
buff-ruby_engine (
|
48
|
-
buff-shell_out (
|
49
|
-
buff-ruby_engine (~>
|
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.
|
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.
|
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.
|
75
|
+
hashie (3.4.6)
|
77
76
|
hitimes (1.2.4)
|
78
|
-
httpclient (2.
|
79
|
-
inspec (0.
|
77
|
+
httpclient (2.8.2.4)
|
78
|
+
inspec (0.35.0)
|
80
79
|
hashie (~> 3.4)
|
81
|
-
json (
|
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.
|
91
|
+
train (>= 0.19.0, < 1.0)
|
90
92
|
jmespath (1.3.1)
|
91
|
-
json (
|
92
|
-
kitchen-ec2 (1.
|
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.
|
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.
|
114
|
-
mixlib-install (1.
|
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.
|
121
|
+
mixlib-shellout (2.2.7)
|
120
122
|
mixlib-versioning (1.1.0)
|
121
|
-
molinillo (0.
|
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 (
|
142
|
+
ridley (5.1.0)
|
140
143
|
addressable
|
141
|
-
buff-config (~>
|
142
|
-
buff-extensions (~>
|
143
|
-
buff-ignore (~> 1.
|
144
|
-
buff-shell_out (~> 0
|
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 (~>
|
156
|
-
varia_model (~> 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.
|
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 (
|
182
|
+
semverse (2.0.0)
|
180
183
|
slop (3.6.0)
|
181
|
-
solve (
|
182
|
-
molinillo (~> 0.4
|
183
|
-
semverse (
|
184
|
-
|
185
|
-
|
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.
|
199
|
+
train (0.20.0)
|
196
200
|
docker-api (~> 1.26)
|
197
|
-
json (
|
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 (~>
|
202
|
-
winrm-fs (~> 0
|
203
|
-
varia_model (0.
|
204
|
-
buff-extensions (~>
|
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 (
|
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.
|
217
|
-
winrm (~>
|
218
|
-
winrm-fs (~> 0
|
219
|
-
winrm-fs (0.
|
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 (~>
|
228
|
+
winrm (~> 2.0)
|
224
229
|
|
225
230
|
PLATFORMS
|
226
231
|
ruby
|
data/chef-dk.gemspec
CHANGED
@@ -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.
|
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://
|
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
|
-
|
@@ -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
|
-
|
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]
|
data/lib/chef-dk/command/push.rb
CHANGED