chef-cli 5.4.2 → 5.5.6

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: 180e1e5895a8604a176373f4487965112e6e654e3ccdda57702dcd2225fb7fe6
4
- data.tar.gz: cc9cdf43be85e79ab4570df9ab1842f17bdf9734d41ba79d2613705d81569ef8
3
+ metadata.gz: 38c929fa9c8587e5030c03d78715e5b483326e958a104ac4403f68779a8cdfd3
4
+ data.tar.gz: '07841d7b155b98b52cdb483c0e041ee8e59c34353295aa393c114db19af321b5'
5
5
  SHA512:
6
- metadata.gz: 0cdae9558d564cbe69894be1168c044d53d55774a0477a53d47207b35a9f6f344c27d36565ae7506f423ffd5ac036cff4639b2f6018b2436fa1087f7324374e7
7
- data.tar.gz: db0051c734a7d21cba7412efc9e223c8d4eff7eb51f30e9636ce250794fde33f221413d1f2c7fec91525672b8e02b47048e84814557e3d32b0d7c1835f38d933
6
+ metadata.gz: f7a6a2dfdbe694ed6897733c16af217c344a1d9163354325163172b21a9c8f5e00e26586774bd1f864b4b226a7fad72901aad776035a4d023f6432aae128242a
7
+ data.tar.gz: 659dbe818405db54685e7356156b6db39b671e7de86bf40fd3282ef497d68173a7042f3091cf7c60306d30639c7260349bcdab6e8ae1d5c28cd5ddadf9b5dc54
data/Gemfile CHANGED
@@ -19,6 +19,8 @@ group :test do
19
19
  if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.7")
20
20
  gem "ohai", "~> 16"
21
21
  end
22
+
23
+ gem "simplecov", require: false
22
24
  end
23
25
 
24
26
  group :development do
@@ -57,7 +57,4 @@ ChefCLI.commands do |c|
57
57
 
58
58
  c.builtin "describe-cookbook", :DescribeCookbook, require_path: "chef-cli/command/describe_cookbook",
59
59
  desc: "Prints cookbook checksum information used for cookbook identifier"
60
-
61
- # deprecated command that throws a failure warning if used. This was removed 4.2019
62
- c.builtin "provision", :Provision, desc: "Provision VMs and clusters via cookbook", hidden: true
63
60
  end
@@ -42,6 +42,17 @@ module ChefCLI
42
42
  description: "Show #{ChefCLI::Dist::PRODUCT} version",
43
43
  boolean: true
44
44
 
45
+ option :debug,
46
+ short: "-D",
47
+ long: "--debug",
48
+ description: "Enable stacktraces and other debug output",
49
+ default: false
50
+
51
+ option :config_file,
52
+ short: "-c CONFIG_FILE",
53
+ long: "--config CONFIG_FILE",
54
+ description: "Path to configuration file"
55
+
45
56
  def initialize
46
57
  super
47
58
  end
@@ -43,17 +43,6 @@ module ChefCLI
43
43
 
44
44
  BANNER
45
45
 
46
- option :config_file,
47
- short: "-c CONFIG_FILE",
48
- long: "--config CONFIG_FILE",
49
- description: "Path to configuration file"
50
-
51
- option :debug,
52
- short: "-D",
53
- long: "--debug",
54
- description: "Enable stacktraces and other debug output",
55
- default: false
56
-
57
46
  include Configurable
58
47
 
59
48
  attr_accessor :ui
@@ -42,17 +42,6 @@ module ChefCLI
42
42
 
43
43
  BANNER
44
44
 
45
- option :config_file,
46
- short: "-c CONFIG_FILE",
47
- long: "--config CONFIG_FILE",
48
- description: "Path to configuration file"
49
-
50
- option :debug,
51
- short: "-D",
52
- long: "--debug",
53
- description: "Enable stacktraces and other debug output",
54
- default: false
55
-
56
45
  include Configurable
57
46
 
58
47
  attr_accessor :ui
@@ -42,17 +42,6 @@ module ChefCLI
42
42
 
43
43
  BANNER
44
44
 
45
- option :config_file,
46
- short: "-c CONFIG_FILE",
47
- long: "--config CONFIG_FILE",
48
- description: "Path to configuration file"
49
-
50
- option :debug,
51
- short: "-D",
52
- long: "--debug",
53
- description: "Enable stacktraces and other debug output",
54
- default: false
55
-
56
45
  include Configurable
57
46
 
58
47
  attr_accessor :ui
@@ -42,17 +42,6 @@ module ChefCLI
42
42
 
43
43
  BANNER
44
44
 
45
- option :config_file,
46
- short: "-c CONFIG_FILE",
47
- long: "--config CONFIG_FILE",
48
- description: "Path to configuration file"
49
-
50
- option :debug,
51
- short: "-D",
52
- long: "--debug",
53
- description: "Enable stacktraces and other debug output",
54
- default: false
55
-
56
45
  include Configurable
57
46
 
58
47
  attr_accessor :ui
@@ -86,17 +86,6 @@ module ChefCLI
86
86
  default: true,
87
87
  boolean: true
88
88
 
89
- option :config_file,
90
- short: "-c CONFIG_FILE",
91
- long: "--config CONFIG_FILE",
92
- description: "Path to configuration file."
93
-
94
- option :debug,
95
- short: "-D",
96
- long: "--debug",
97
- description: "Enable stacktraces and other debug output.",
98
- default: false
99
-
100
89
  attr_accessor :ui
101
90
 
102
91
  attr_reader :old_base
@@ -55,7 +55,6 @@ module ChefCLI
55
55
  generator(:repo, :Repo, "Generate a #{ChefCLI::Dist::INFRA_PRODUCT} code repository")
56
56
  generator(:policyfile, :Policyfile, "Generate a Policyfile for use with the install/push commands")
57
57
  generator(:generator, :GeneratorGenerator, "Copy #{ChefCLI::Dist::PRODUCT}'s generator cookbook so you can customize it")
58
- generator(:'build-cookbook', :BuildCookbook, "DEPRECATED: Generate a build cookbook for use with #{ChefCLI::Dist::WORKFLOW}")
59
58
 
60
59
  def self.banner_headline
61
60
  <<~E
@@ -82,10 +81,6 @@ module ChefCLI
82
81
  end
83
82
 
84
83
  def run(params)
85
- if params[0] == "build-cookbook"
86
- warn "[DEPRECATION] Chef Workflow (Delivery) is end of life (EOL) as of December 31, 2020 and this generator subcommand has been removed".freeze
87
- return 1
88
- end
89
84
  if ( generator_spec = generator_for(params[0]) )
90
85
  params.shift
91
86
  generator = GeneratorCommands.build(generator_spec.class_name, params)
@@ -65,7 +65,7 @@ module ChefCLI
65
65
  option :workflow,
66
66
  short: "-w",
67
67
  long: "--workflow",
68
- description: "DEPRECATED: Generate a cookbook with a full #{ChefCLI::Dist::WORKFLOW} build cookbook.",
68
+ description: "REMOVED: #{ChefCLI::Dist::WORKFLOW} is EOL. This option has been removed.",
69
69
  boolean: true,
70
70
  default: false
71
71
 
@@ -85,8 +85,8 @@ module ChefCLI
85
85
 
86
86
  option :pipeline,
87
87
  long: "--pipeline PIPELINE",
88
- description: "Use PIPELINE to set target branch to something other than master for the #{ChefCLI::Dist::WORKFLOW} build_cookbook",
89
- default: "master"
88
+ description: "REMOVED: #{ChefCLI::Dist::WORKFLOW} is EOL. This option has been removed.",
89
+ default: nil
90
90
 
91
91
  options.merge!(SharedGeneratorOptions.options)
92
92
 
@@ -119,17 +119,12 @@ module ChefCLI
119
119
 
120
120
  def emit_post_create_message
121
121
  default_recipe_file = yaml ? "default.yml" : "default.rb"
122
- if have_delivery_config?
123
- msg("Your cookbook is ready. To setup the pipeline, type `cd #{cookbook_name_or_path}`, then run `delivery init`")
124
- else
125
- msg("Your cookbook is ready. Type `cd #{cookbook_name_or_path}` to enter it.")
126
- msg("\nThere are several commands you can run to get started locally developing and testing your cookbook.")
127
- msg("Type `delivery local --help` to see a full list of local testing commands.")
128
- msg("\nWhy not start by writing an InSpec test? Tests for the default recipe are stored at:\n")
129
- msg("test/integration/default/default_test.rb")
130
- msg("\nIf you'd prefer to dive right in, the default recipe can be found at:")
131
- msg("\nrecipes/#{default_recipe_file}\n")
132
- end
122
+ msg("Your cookbook is ready. Type `cd #{cookbook_name_or_path}` to enter it.")
123
+ msg("\nThere are several commands you can run to get started locally developing and testing your cookbook.")
124
+ msg("\nWhy not start by writing an InSpec test? Tests for the default recipe are stored at:\n")
125
+ msg("test/integration/default/default_test.rb")
126
+ msg("\nIf you'd prefer to dive right in, the default recipe can be found at:")
127
+ msg("\nrecipes/#{default_recipe_file}\n")
133
128
  end
134
129
 
135
130
  def setup_context
@@ -143,16 +138,10 @@ module ChefCLI
143
138
  Generator.add_attr_to_context(:policy_run_list, policy_run_list)
144
139
  Generator.add_attr_to_context(:policy_local_cookbook, ".")
145
140
 
146
- Generator.add_attr_to_context(:enable_workflow, enable_workflow?)
147
- Generator.add_attr_to_context(:workflow_project_dir, cookbook_full_path)
148
- Generator.add_attr_to_context(:build_cookbook_parent_is_cookbook, true)
149
- Generator.add_attr_to_context(:workflow_project_git_initialized, have_git? && !cookbook_path_in_git_repo?)
150
-
151
141
  Generator.add_attr_to_context(:verbose, verbose?)
152
142
  Generator.add_attr_to_context(:specs, specs?)
153
143
 
154
144
  Generator.add_attr_to_context(:use_policyfile, policy_mode?)
155
- Generator.add_attr_to_context(:pipeline, pipeline)
156
145
  Generator.add_attr_to_context(:kitchen, kitchen)
157
146
  Generator.add_attr_to_context(:vscode_dir, create_vscode_dir?)
158
147
  Generator.add_attr_to_context(:yaml, yaml)
@@ -162,10 +151,6 @@ module ChefCLI
162
151
  config[:kitchen]
163
152
  end
164
153
 
165
- def pipeline
166
- config[:pipeline]
167
- end
168
-
169
154
  def yaml
170
155
  config[:yaml]
171
156
  end
@@ -202,10 +187,6 @@ module ChefCLI
202
187
  @policy_mode
203
188
  end
204
189
 
205
- def enable_workflow?
206
- config[:workflow]
207
- end
208
-
209
190
  def verbose?
210
191
  @verbose
211
192
  end
@@ -214,22 +195,10 @@ module ChefCLI
214
195
  @specs
215
196
  end
216
197
 
217
- #
218
- # Is there a .delivery/cli.toml in the current dir or any of the parent dirs
219
- #
220
- # @return [Boolean]
221
- #
222
- def have_delivery_config?
223
- # delivery-cli's logic is to look recursively upward for
224
- # .delivery/cli.toml starting from pwd:
225
- # https://github.com/chef/delivery-cli/blob/22cbef3987ebd0aee98405b7e161a100edc87e49/src/delivery/config/mod.rs#L225-L247
226
-
227
- Pathname.pwd.ascend.any? { |path| path.join(".delivery/cli.toml").exist? }
228
- end
229
-
230
198
  def read_and_validate_params
231
199
  arguments = parse_options(params)
232
200
  @cookbook_name_or_path = arguments[0]
201
+
233
202
  if !@cookbook_name_or_path
234
203
  @params_valid = false
235
204
  elsif File.basename(@cookbook_name_or_path).include?("-")
@@ -241,6 +210,11 @@ module ChefCLI
241
210
  @params_valid = false
242
211
  end
243
212
 
213
+ if config[:workflow] || config[:pipeline]
214
+ err("[DEPRECATION] Chef Workflow (Delivery) is end of life (EOL) as of December 31, 2020 and the --workflow and --pipeline flags have been removed")
215
+ @params_valid = false
216
+ end
217
+
244
218
  if config[:berks]
245
219
  @policy_mode = false
246
220
  end
@@ -46,17 +46,6 @@ module ChefCLI
46
46
 
47
47
  E
48
48
 
49
- option :config_file,
50
- short: "-c CONFIG_FILE",
51
- long: "--config CONFIG_FILE",
52
- description: "Path to configuration file"
53
-
54
- option :debug,
55
- short: "-D",
56
- long: "--debug",
57
- description: "Enable stacktraces and other debug output",
58
- default: false
59
-
60
49
  attr_reader :policyfile_relative_path
61
50
 
62
51
  attr_accessor :ui
@@ -44,17 +44,6 @@ module ChefCLI
44
44
 
45
45
  E
46
46
 
47
- option :config_file,
48
- short: "-c CONFIG_FILE",
49
- long: "--config CONFIG_FILE",
50
- description: "Path to configuration file"
51
-
52
- option :debug,
53
- short: "-D",
54
- long: "--debug",
55
- description: "Enable stacktraces and other debug output",
56
- default: false
57
-
58
47
  attr_reader :policyfile_relative_path
59
48
  attr_reader :policy_group
60
49
 
@@ -43,17 +43,6 @@ module ChefCLI
43
43
  Options:
44
44
  E
45
45
 
46
- option :config_file,
47
- short: "-c CONFIG_FILE",
48
- long: "--config CONFIG_FILE",
49
- description: "Path to configuration file"
50
-
51
- option :debug,
52
- short: "-D",
53
- long: "--debug",
54
- description: "Enable stacktraces and other debug output",
55
- default: false
56
-
57
46
  attr_accessor :ui
58
47
 
59
48
  attr_reader :policy_group
@@ -58,17 +58,6 @@ module ChefCLI
58
58
  default: true,
59
59
  boolean: true
60
60
 
61
- option :config_file,
62
- short: "-c CONFIG_FILE",
63
- long: "--config CONFIG_FILE",
64
- description: "Path to configuration file"
65
-
66
- option :debug,
67
- short: "-D",
68
- long: "--debug",
69
- description: "Enable stacktraces and other debug output",
70
- default: false
71
-
72
61
  include Configurable
73
62
 
74
63
  attr_accessor :ui
@@ -63,17 +63,6 @@ module ChefCLI
63
63
  long: "--id ID",
64
64
  description: "Undo the delete operation with the given ID"
65
65
 
66
- option :config_file,
67
- short: "-c CONFIG_FILE",
68
- long: "--config CONFIG_FILE",
69
- description: "Path to configuration file"
70
-
71
- option :debug,
72
- short: "-D",
73
- long: "--debug",
74
- description: "Enable stacktraces and other debug output",
75
- default: false
76
-
77
66
  include Configurable
78
67
 
79
68
  attr_accessor :ui
@@ -131,20 +131,6 @@ else
131
131
  end
132
132
  end
133
133
 
134
- # the same will be done below if workflow was enabled so avoid double work and skip this
135
- unless context.enable_workflow
136
- directory "#{cookbook_dir}/.delivery"
137
-
138
- template "#{cookbook_dir}/.delivery/project.toml" do
139
- variables(
140
- specs: context.specs
141
- )
142
- source 'delivery-project.toml.erb'
143
- helpers(ChefCLI::Generator::TemplateHelper)
144
- action :create_if_missing
145
- end
146
- end
147
-
148
134
  # git
149
135
  if context.have_git
150
136
  unless context.skip_git_init
@@ -189,18 +175,3 @@ if context.vscode_dir
189
175
  CONTENT
190
176
  end
191
177
  end
192
-
193
- if context.enable_workflow
194
- warn "\n---------WARNING---------\nThe --workflow flag is deprecated as #{ChefCLI::Dist::WORKFLOW} is EOL as of December 2020.\n\nThis flag will be ignored and will be removed in a future release.\n-------------------------\n\n"
195
- directory "#{cookbook_dir}/.delivery"
196
-
197
- template "#{cookbook_dir}/.delivery/project.toml" do
198
- variables(
199
- specs: context.specs
200
- )
201
- source 'delivery-project.toml.erb'
202
- helpers(ChefCLI::Generator::TemplateHelper)
203
- action :create_if_missing
204
- end
205
-
206
- end
@@ -2,8 +2,8 @@
2
2
  driver:
3
3
  name: vagrant
4
4
 
5
- ## The forwarded_port port feature lets you connect to ports on the VM guest via
6
- ## localhost on the host.
5
+ ## The forwarded_port port feature lets you connect to ports on the VM guest
6
+ ## via localhost on the host.
7
7
  ## see also: https://www.vagrantup.com/docs/networking/forwarded_ports
8
8
 
9
9
  # network:
@@ -29,4 +29,3 @@ suites:
29
29
  verifier:
30
30
  inspec_tests:
31
31
  - test/integration/default
32
- attributes:
@@ -16,5 +16,5 @@
16
16
  #
17
17
 
18
18
  module ChefCLI
19
- VERSION = "5.4.2".freeze
19
+ VERSION = "5.5.6".freeze
20
20
  end
data/spec/spec_helper.rb CHANGED
@@ -24,6 +24,8 @@ require "chef/workstation_config_loader"
24
24
  require "chef/config"
25
25
 
26
26
  require "chef-cli/cli"
27
+ require "simplecov"
28
+ SimpleCov.start
27
29
 
28
30
  RSpec.configure do |c|
29
31
  running_on_windows = (RUBY_PLATFORM =~ /mswin|mingw|windows/)
@@ -16,6 +16,7 @@
16
16
  #
17
17
 
18
18
  require "spec_helper"
19
+ require "chef-cli/command/base"
19
20
 
20
21
  describe ChefCLI::Command::Base do
21
22
  class TestCommand < ChefCLI::Command::Base
@@ -126,6 +127,8 @@ describe ChefCLI::Command::Base do
126
127
  use me please
127
128
  -a, --arg ARG An option with a required argument
128
129
  --chef-license ACCEPTANCE Accept the license for this product and any contained products ('accept', 'accept-no-persist', or 'accept-silent')
130
+ -c, --config CONFIG_FILE Path to configuration file
131
+ -D, --debug Enable stacktraces and other debug output
129
132
  -h, --help Show this message
130
133
  -u, --user If the user exists
131
134
  -v, --version Show #{ChefCLI::Dist::PRODUCT} version
@@ -147,6 +150,8 @@ describe ChefCLI::Command::Base do
147
150
  use me please
148
151
  -a, --arg ARG An option with a required argument
149
152
  --chef-license ACCEPTANCE Accept the license for this product and any contained products ('accept', 'accept-no-persist', or 'accept-silent')
153
+ -c, --config CONFIG_FILE Path to configuration file
154
+ -D, --debug Enable stacktraces and other debug output
150
155
  -h, --help Show this message
151
156
  -u, --user If the user exists
152
157
  -v, --version Show #{ChefCLI::Dist::PRODUCT} version
@@ -137,13 +137,5 @@ describe ChefCLI::Command::Generate do
137
137
  end
138
138
 
139
139
  end
140
-
141
- describe "When build-cookbookis given as subcommand" do
142
- it "shows deprecation warning when" do
143
- result = generate.run(%w{build-cookbook example})
144
- expect(result).to eq(1)
145
- end
146
- end
147
-
148
140
  end
149
141
  end
@@ -87,7 +87,6 @@ describe ChefCLI::Command::GeneratorCommands::Cookbook do
87
87
  Your cookbook is ready. Type `cd new_cookbook` to enter it.
88
88
 
89
89
  There are several commands you can run to get started locally developing and testing your cookbook.
90
- Type `delivery local --help` to see a full list of local testing commands.
91
90
 
92
91
  Why not start by writing an InSpec test? Tests for the default recipe are stored at:
93
92
 
@@ -373,8 +372,8 @@ describe ChefCLI::Command::GeneratorCommands::Cookbook do
373
372
  driver:
374
373
  name: vagrant
375
374
 
376
- ## The forwarded_port port feature lets you connect to ports on the VM guest via
377
- ## localhost on the host.
375
+ ## The forwarded_port port feature lets you connect to ports on the VM guest
376
+ ## via localhost on the host.
378
377
  ## see also: https://www.vagrantup.com/docs/networking/forwarded_ports
379
378
 
380
379
  # network:
@@ -400,7 +399,6 @@ describe ChefCLI::Command::GeneratorCommands::Cookbook do
400
399
  verifier:
401
400
  inspec_tests:
402
401
  - test/integration/default
403
- attributes:
404
402
  KITCHEN_YML
405
403
  end
406
404
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.2
4
+ version: 5.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-02 00:00:00.000000000 Z
11
+ date: 2022-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-cli
@@ -254,7 +254,6 @@ files:
254
254
  - lib/chef-cli/command/generator_commands/resource.rb
255
255
  - lib/chef-cli/command/generator_commands/template.rb
256
256
  - lib/chef-cli/command/install.rb
257
- - lib/chef-cli/command/provision.rb
258
257
  - lib/chef-cli/command/push.rb
259
258
  - lib/chef-cli/command/push_archive.rb
260
259
  - lib/chef-cli/command/shell_init.rb
@@ -330,7 +329,6 @@ files:
330
329
  - lib/chef-cli/skeletons/code_generator/files/default/chefignore
331
330
  - lib/chef-cli/skeletons/code_generator/files/default/cookbook_readmes/README-policy.md
332
331
  - lib/chef-cli/skeletons/code_generator/files/default/cookbook_readmes/README.md
333
- - lib/chef-cli/skeletons/code_generator/files/default/delivery-project.toml
334
332
  - lib/chef-cli/skeletons/code_generator/files/default/gitignore
335
333
  - lib/chef-cli/skeletons/code_generator/files/default/repo/README.md
336
334
  - lib/chef-cli/skeletons/code_generator/files/default/repo/cookbooks/example/README.md
@@ -367,7 +365,6 @@ files:
367
365
  - lib/chef-cli/skeletons/code_generator/templates/default/README.md.erb
368
366
  - lib/chef-cli/skeletons/code_generator/templates/default/attribute.rb.erb
369
367
  - lib/chef-cli/skeletons/code_generator/templates/default/cookbook_file.erb
370
- - lib/chef-cli/skeletons/code_generator/templates/default/delivery-project.toml.erb
371
368
  - lib/chef-cli/skeletons/code_generator/templates/default/helpers.rb.erb
372
369
  - lib/chef-cli/skeletons/code_generator/templates/default/inspec_default_test.rb.erb
373
370
  - lib/chef-cli/skeletons/code_generator/templates/default/kitchen.yml.erb
@@ -1,36 +0,0 @@
1
- #
2
- # Copyright:: Chef Software Inc.
3
- # License:: Apache License, Version 2.0
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
- #
17
-
18
- require_relative "base"
19
- require_relative "../chef_runner"
20
- require_relative "../dist"
21
-
22
- module ChefCLI
23
-
24
- module Command
25
-
26
- class Provision < Base
27
-
28
- banner("DEPRECATED: Chef provisioning has been removed from #{ChefCLI::Dist::PRODUCT}. If you require Chef Provisioning you will need to install an earlier version of these products!")
29
-
30
- def run(params = [])
31
- raise "Chef provisioning has been removed from #{ChefCLI::Dist::PRODUCT}. If you require Chef Provisioning you will need to install an earlier version of these products!"
32
- end
33
-
34
- end
35
- end
36
- end
@@ -1,32 +0,0 @@
1
- # Delivery for Local Phases Execution
2
- #
3
- # This file allows you to execute test phases locally on a workstation or
4
- # in a CI pipeline. The delivery-cli will read this file and execute the
5
- # command(s) that are configured for each phase. You can customize them
6
- # by just modifying the phase key on this file.
7
- #
8
- # By default these phases are configured for Cookbook Workflow only
9
- #
10
-
11
- [local_phases]
12
- unit = "chef exec rspec spec/"
13
- lint = "chef exec cookstyle"
14
- # foodcritic has been deprecated in favor of cookstyle so we skip the syntax
15
- # phase now.
16
- syntax = "echo skipping syntax phase. Use lint phase instead."
17
- provision = "chef exec kitchen create"
18
- deploy = "chef exec kitchen converge"
19
- smoke = "chef exec kitchen verify"
20
- # The functional phase is optional, you can define it by uncommenting
21
- # the line below and running the command: `delivery local functional`
22
- # functional = ""
23
- cleanup = "chef exec kitchen destroy"
24
-
25
- # Remote project.toml file
26
- #
27
- # Instead of the local phases above, you may specify a remote URI location for
28
- # the `project.toml` file. This is useful for teams that wish to centrally
29
- # manage the behavior of the `delivery local` command across many different
30
- # projects.
31
- #
32
- # remote_file = "https://url/project.toml"
@@ -1,36 +0,0 @@
1
- # Delivery for Local Phases Execution
2
- #
3
- # This file allows you to execute test phases locally on a workstation or
4
- # in a CI pipeline. The delivery-cli will read this file and execute the
5
- # command(s) that are configured for each phase. You can customize them
6
- # by just modifying the phase key on this file.
7
- #
8
- # By default these phases are configured for Cookbook Workflow only
9
- #
10
-
11
- [local_phases]
12
- <% if @specs %>
13
- unit = "chef exec rspec spec/"
14
- <% else %>
15
- unit = "echo skipping unit phase."
16
- <% end %>
17
- lint = "chef exec cookstyle"
18
- # foodcritic has been deprecated in favor of cookstyle so we skip the syntax
19
- # phase now.
20
- syntax = "echo skipping syntax phase. Use lint phase instead."
21
- provision = "chef exec kitchen create"
22
- deploy = "chef exec kitchen converge"
23
- smoke = "chef exec kitchen verify"
24
- # The functional phase is optional, you can define it by uncommenting
25
- # the line below and running the command: `delivery local functional`
26
- # functional = ""
27
- cleanup = "chef exec kitchen destroy"
28
-
29
- # Remote project.toml file
30
- #
31
- # Instead of the local phases above, you may specify a remote URI location for
32
- # the `project.toml` file. This is useful for teams that wish to centrally
33
- # manage the behavior of the `delivery local` command across many different
34
- # projects.
35
- #
36
- # remote_file = "https://url/project.toml"