chef-cli 5.3.1 → 5.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Rakefile +1 -1
- data/chef-cli.gemspec +1 -1
- data/lib/chef-cli/authenticated_http.rb +1 -1
- data/lib/chef-cli/builtin_commands.rb +1 -4
- data/lib/chef-cli/chef_runner.rb +1 -1
- data/lib/chef-cli/chef_server_api_multi.rb +1 -1
- data/lib/chef-cli/cli.rb +1 -1
- data/lib/chef-cli/command/base.rb +12 -1
- data/lib/chef-cli/command/clean_policy_cookbooks.rb +1 -12
- data/lib/chef-cli/command/clean_policy_revisions.rb +1 -12
- data/lib/chef-cli/command/delete_policy.rb +1 -12
- data/lib/chef-cli/command/delete_policy_group.rb +1 -12
- data/lib/chef-cli/command/describe_cookbook.rb +17 -0
- data/lib/chef-cli/command/diff.rb +1 -12
- data/lib/chef-cli/command/env.rb +1 -1
- data/lib/chef-cli/command/exec.rb +1 -1
- data/lib/chef-cli/command/gem.rb +1 -1
- data/lib/chef-cli/command/generate.rb +1 -6
- data/lib/chef-cli/command/generator_commands/attribute.rb +1 -1
- data/lib/chef-cli/command/generator_commands/base.rb +1 -1
- data/lib/chef-cli/command/generator_commands/chef_exts/generator_desc_resource.rb +1 -1
- data/lib/chef-cli/command/generator_commands/chef_exts/quieter_doc_formatter.rb +1 -1
- data/lib/chef-cli/command/generator_commands/chef_exts/recipe_dsl_ext.rb +1 -1
- data/lib/chef-cli/command/generator_commands/cookbook.rb +15 -41
- data/lib/chef-cli/command/generator_commands/cookbook_code_file.rb +1 -1
- data/lib/chef-cli/command/generator_commands/cookbook_file.rb +1 -1
- data/lib/chef-cli/command/generator_commands/generator_generator.rb +1 -1
- data/lib/chef-cli/command/generator_commands/helpers.rb +1 -1
- data/lib/chef-cli/command/generator_commands/policyfile.rb +1 -1
- data/lib/chef-cli/command/generator_commands/recipe.rb +1 -1
- data/lib/chef-cli/command/generator_commands/repo.rb +1 -1
- data/lib/chef-cli/command/generator_commands/resource.rb +1 -1
- data/lib/chef-cli/command/generator_commands/template.rb +1 -1
- data/lib/chef-cli/command/generator_commands.rb +1 -1
- data/lib/chef-cli/command/install.rb +1 -12
- data/lib/chef-cli/command/push.rb +1 -12
- data/lib/chef-cli/command/push_archive.rb +1 -12
- data/lib/chef-cli/command/shell_init.rb +1 -1
- data/lib/chef-cli/command/show_policy.rb +1 -12
- data/lib/chef-cli/command/undelete.rb +1 -12
- data/lib/chef-cli/command/update.rb +1 -1
- data/lib/chef-cli/commands_map.rb +1 -1
- data/lib/chef-cli/configurable.rb +1 -1
- data/lib/chef-cli/cookbook_metadata.rb +1 -1
- data/lib/chef-cli/cookbook_omnifetch.rb +1 -1
- data/lib/chef-cli/cookbook_profiler/git.rb +3 -3
- data/lib/chef-cli/cookbook_profiler/identifiers.rb +1 -1
- data/lib/chef-cli/cookbook_profiler/null_scm.rb +1 -1
- data/lib/chef-cli/exceptions.rb +1 -1
- data/lib/chef-cli/generator.rb +1 -1
- data/lib/chef-cli/helpers.rb +1 -1
- data/lib/chef-cli/pager.rb +1 -1
- data/lib/chef-cli/policyfile/artifactory_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/attribute_merge_checker.rb +1 -1
- data/lib/chef-cli/policyfile/chef_repo_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/chef_server_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/chef_server_lock_fetcher.rb +1 -1
- data/lib/chef-cli/policyfile/community_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/comparison_base.rb +1 -1
- data/lib/chef-cli/policyfile/cookbook_location_specification.rb +1 -1
- data/lib/chef-cli/policyfile/cookbook_locks.rb +1 -1
- data/lib/chef-cli/policyfile/cookbook_sources.rb +1 -1
- data/lib/chef-cli/policyfile/delivery_supermarket_source.rb +1 -1
- data/lib/chef-cli/policyfile/differ.rb +1 -1
- data/lib/chef-cli/policyfile/git_lock_fetcher.rb +1 -1
- data/lib/chef-cli/policyfile/included_policies_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/lister.rb +1 -1
- data/lib/chef-cli/policyfile/local_lock_fetcher.rb +1 -1
- data/lib/chef-cli/policyfile/lock_applier.rb +1 -1
- data/lib/chef-cli/policyfile/lock_fetcher_mixin.rb +1 -1
- data/lib/chef-cli/policyfile/null_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/policyfile_location_specification.rb +1 -1
- data/lib/chef-cli/policyfile/read_cookbook_for_compat_mode_upload.rb +1 -1
- data/lib/chef-cli/policyfile/remote_lock_fetcher.rb +1 -1
- data/lib/chef-cli/policyfile/reports/install.rb +1 -1
- data/lib/chef-cli/policyfile/reports/table_printer.rb +1 -1
- data/lib/chef-cli/policyfile/reports/upload.rb +1 -1
- data/lib/chef-cli/policyfile/solution_dependencies.rb +1 -1
- data/lib/chef-cli/policyfile/source_uri.rb +1 -1
- data/lib/chef-cli/policyfile/storage_config.rb +1 -1
- data/lib/chef-cli/policyfile/undo_record.rb +1 -1
- data/lib/chef-cli/policyfile/undo_stack.rb +1 -1
- data/lib/chef-cli/policyfile/uploader.rb +1 -1
- data/lib/chef-cli/policyfile_compiler.rb +1 -1
- data/lib/chef-cli/policyfile_lock.rb +1 -1
- data/lib/chef-cli/policyfile_services/clean_policies.rb +1 -1
- data/lib/chef-cli/policyfile_services/clean_policy_cookbooks.rb +1 -1
- data/lib/chef-cli/policyfile_services/install.rb +1 -1
- data/lib/chef-cli/policyfile_services/push.rb +1 -1
- data/lib/chef-cli/policyfile_services/push_archive.rb +1 -1
- data/lib/chef-cli/policyfile_services/rm_policy.rb +1 -1
- data/lib/chef-cli/policyfile_services/rm_policy_group.rb +1 -1
- data/lib/chef-cli/policyfile_services/show_policy.rb +1 -1
- data/lib/chef-cli/policyfile_services/undelete.rb +1 -1
- data/lib/chef-cli/policyfile_services/update_attributes.rb +1 -1
- data/lib/chef-cli/service_exception_inspectors/base.rb +1 -1
- data/lib/chef-cli/service_exception_inspectors/http.rb +1 -1
- data/lib/chef-cli/service_exception_inspectors.rb +1 -1
- data/lib/chef-cli/service_exceptions.rb +1 -1
- data/lib/chef-cli/shell_out.rb +1 -1
- data/lib/chef-cli/skeletons/code_generator/metadata.rb +1 -1
- data/lib/chef-cli/skeletons/code_generator/recipes/cookbook.rb +0 -29
- data/lib/chef-cli/skeletons/code_generator/templates/default/inspec_default_test.rb.erb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen.yml.erb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen_dokken.yml.erb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen_policyfile.yml.erb +3 -4
- data/lib/chef-cli/skeletons/code_generator/templates/default/metadata.rb.erb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/recipe_spec.rb.erb +2 -2
- data/lib/chef-cli/ui.rb +1 -1
- data/lib/chef-cli/version.rb +2 -2
- data/lib/chef-cli.rb +1 -1
- data/spec/shared/custom_generator_cookbook.rb +0 -44
- data/spec/shared/fixture_cookbook_checksums.rb +1 -1
- data/spec/shared/setup_git_committer_config.rb +1 -1
- data/spec/shared/setup_git_cookbooks.rb +1 -1
- data/spec/spec_helper.rb +3 -1
- data/spec/unit/chef_runner_spec.rb +1 -1
- data/spec/unit/chef_server_api_multi_spec.rb +1 -1
- data/spec/unit/cli_spec.rb +1 -1
- data/spec/unit/command/base_spec.rb +6 -1
- data/spec/unit/command/clean_policy_cookbooks_spec.rb +1 -1
- data/spec/unit/command/clean_policy_revisions_spec.rb +1 -1
- data/spec/unit/command/delete_policy_group_spec.rb +1 -1
- data/spec/unit/command/delete_policy_spec.rb +1 -1
- data/spec/unit/command/diff_spec.rb +1 -1
- data/spec/unit/command/env_spec.rb +1 -1
- data/spec/unit/command/exec_spec.rb +1 -1
- data/spec/unit/command/generate_spec.rb +1 -9
- data/spec/unit/command/generator_commands/attribute_spec.rb +1 -1
- data/spec/unit/command/generator_commands/base_spec.rb +1 -1
- data/spec/unit/command/generator_commands/chef_exts/generator_desc_resource_spec.rb +1 -1
- data/spec/unit/command/generator_commands/chef_exts/recipe_dsl_ext_spec.rb +1 -1
- data/spec/unit/command/generator_commands/cookbook_file_spec.rb +1 -1
- data/spec/unit/command/generator_commands/cookbook_spec.rb +5 -336
- data/spec/unit/command/generator_commands/generator_generator_spec.rb +1 -1
- data/spec/unit/command/generator_commands/helpers_spec.rb +1 -1
- data/spec/unit/command/generator_commands/policyfile_spec.rb +1 -1
- data/spec/unit/command/generator_commands/recipe_spec.rb +1 -1
- data/spec/unit/command/generator_commands/repo_spec.rb +1 -1
- data/spec/unit/command/generator_commands/resource_spec.rb +1 -1
- data/spec/unit/command/generator_commands/template_spec.rb +1 -1
- data/spec/unit/command/install_spec.rb +1 -1
- data/spec/unit/command/push_archive_spec.rb +1 -1
- data/spec/unit/command/push_spec.rb +1 -1
- data/spec/unit/command/shell_init_spec.rb +1 -1
- data/spec/unit/command/show_policy_spec.rb +1 -1
- data/spec/unit/command/undelete_spec.rb +1 -1
- data/spec/unit/command/update_spec.rb +1 -1
- data/spec/unit/commands_map_spec.rb +1 -1
- data/spec/unit/configurable_spec.rb +1 -1
- data/spec/unit/cookbook_profiler/git_spec.rb +1 -1
- data/spec/unit/cookbook_profiler/identifiers_spec.rb +1 -1
- data/spec/unit/generator_spec.rb +1 -1
- data/spec/unit/helpers_spec.rb +1 -1
- data/spec/unit/pager_spec.rb +1 -1
- data/spec/unit/policyfile/artifactory_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/attribute_merge_checker_spec.rb +1 -1
- data/spec/unit/policyfile/chef_repo_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/chef_server_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/chef_server_lock_fetcher_spec.rb +1 -1
- data/spec/unit/policyfile/community_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/comparison_base_spec.rb +1 -1
- data/spec/unit/policyfile/cookbook_location_specification_spec.rb +1 -1
- data/spec/unit/policyfile/cookbook_locks_spec.rb +1 -1
- data/spec/unit/policyfile/delivery_supermarket_source_spec.rb +1 -1
- data/spec/unit/policyfile/differ_spec.rb +1 -1
- data/spec/unit/policyfile/git_lock_fetcher_spec.rb +1 -1
- data/spec/unit/policyfile/included_policies_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/lister_spec.rb +1 -1
- data/spec/unit/policyfile/local_lock_fetcher_spec.rb +1 -1
- data/spec/unit/policyfile/lock_applier_spec.rb +1 -1
- data/spec/unit/policyfile/lock_fetcher_mixin_spec.rb +1 -1
- data/spec/unit/policyfile/null_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/read_cookbook_for_compat_mode_upload_spec.rb +1 -1
- data/spec/unit/policyfile/remote_lock_fetcher_spec.rb +1 -1
- data/spec/unit/policyfile/reports/install_spec.rb +1 -1
- data/spec/unit/policyfile/reports/upload_spec.rb +1 -1
- data/spec/unit/policyfile/solution_dependencies_spec.rb +1 -1
- data/spec/unit/policyfile/source_uri_spec.rb +1 -1
- data/spec/unit/policyfile/storage_config_spec.rb +1 -1
- data/spec/unit/policyfile/undo_record_spec.rb +1 -1
- data/spec/unit/policyfile/undo_stack_spec.rb +1 -1
- data/spec/unit/policyfile/uploader_spec.rb +1 -1
- data/spec/unit/policyfile_demands_spec.rb +1 -1
- data/spec/unit/policyfile_includes_dsl_spec.rb +1 -1
- data/spec/unit/policyfile_includes_spec.rb +1 -1
- data/spec/unit/policyfile_install_with_includes_spec.rb +1 -1
- data/spec/unit/policyfile_lock_build_spec.rb +1 -1
- data/spec/unit/policyfile_lock_install_spec.rb +1 -1
- data/spec/unit/policyfile_lock_serialization_spec.rb +1 -1
- data/spec/unit/policyfile_lock_validation_spec.rb +1 -1
- data/spec/unit/policyfile_services/clean_policies_spec.rb +1 -1
- data/spec/unit/policyfile_services/clean_policy_cookbooks_spec.rb +1 -1
- data/spec/unit/policyfile_services/export_repo_spec.rb +1 -1
- data/spec/unit/policyfile_services/install_spec.rb +1 -1
- data/spec/unit/policyfile_services/push_archive_spec.rb +1 -1
- data/spec/unit/policyfile_services/push_spec.rb +1 -1
- data/spec/unit/policyfile_services/rm_policy_group_spec.rb +1 -1
- data/spec/unit/policyfile_services/rm_policy_spec.rb +1 -1
- data/spec/unit/policyfile_services/show_policy_spec.rb +1 -1
- data/spec/unit/policyfile_services/undelete_spec.rb +1 -1
- data/spec/unit/policyfile_services/update_attributes_spec.rb +1 -1
- data/spec/unit/policyfile_services/update_spec.rb +1 -1
- data/spec/unit/service_exception_inspectors/base_spec.rb +1 -1
- data/spec/unit/service_exception_inspectors/http_spec.rb +1 -1
- data/spec/unit/shell_out_spec.rb +1 -1
- metadata +4 -7
- data/lib/chef-cli/command/provision.rb +0 -36
- data/lib/chef-cli/skeletons/code_generator/files/default/delivery-project.toml +0 -32
- data/lib/chef-cli/skeletons/code_generator/templates/default/delivery-project.toml.erb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfeb3741f305634bdb91164a529d57fda8ba8dd8ee1a74f942e4e38eb521e79f
|
4
|
+
data.tar.gz: 5f57c0483c71fc7732ad9fec53ee0954022ac35194ba0f4a5909239c10d17e2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8dc515d741fe02197afead1faa446a632b6a71f918370df34585c66b33ef8c760b6ff2f7c14bad37cfdeaaa24f3e98a3884065336912fd8b5982039d43012d5
|
7
|
+
data.tar.gz: 168e5f6b65ef26172869372c3d2af1f2bc2e0f910ae65c12303d3856d1c4e4dd715a3d1c59ef17067feeea217f03912864f30b5a90e1f6f13e0dc13005a48388
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/chef-cli.gemspec
CHANGED
@@ -43,7 +43,7 @@ Gem::Specification.new do |gem|
|
|
43
43
|
gem.add_dependency "mixlib-shellout", ">= 2.0", "< 4.0"
|
44
44
|
gem.add_dependency "ffi-yajl", ">= 1.0", "< 3.0"
|
45
45
|
gem.add_dependency "minitar", "~> 0.6"
|
46
|
-
gem.add_dependency "chef", ">=
|
46
|
+
gem.add_dependency "chef", ">= 16.0"
|
47
47
|
gem.add_dependency "solve", "< 5.0", "> 2.0"
|
48
48
|
gem.add_dependency "addressable", ">= 2.3.5", "< 2.9"
|
49
49
|
gem.add_dependency "cookbook-omnifetch", "~> 0.5"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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
|
data/lib/chef-cli/chef_runner.rb
CHANGED
data/lib/chef-cli/cli.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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
|
@@ -1,3 +1,20 @@
|
|
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
|
+
|
1
18
|
require_relative "base"
|
2
19
|
require_relative "../ui"
|
3
20
|
require_relative "../cookbook_profiler/identifiers"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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
|
data/lib/chef-cli/command/env.rb
CHANGED
data/lib/chef-cli/command/gem.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -65,7 +65,7 @@ module ChefCLI
|
|
65
65
|
option :workflow,
|
66
66
|
short: "-w",
|
67
67
|
long: "--workflow",
|
68
|
-
description: "
|
68
|
+
description: "REMOVED: #{ChefCLI::Dist::WORKFLOW} is EOL. This option has been removed.",
|
69
69
|
boolean: true,
|
70
70
|
default: false
|
71
71
|
|
@@ -85,7 +85,7 @@ module ChefCLI
|
|
85
85
|
|
86
86
|
option :pipeline,
|
87
87
|
long: "--pipeline PIPELINE",
|
88
|
-
description: "
|
88
|
+
description: "REMOVED: #{ChefCLI::Dist::WORKFLOW} is EOL. This option has been removed.",
|
89
89
|
default: "master"
|
90
90
|
|
91
91
|
options.merge!(SharedGeneratorOptions.options)
|
@@ -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
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
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
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -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
|