summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.expeditor/habitat-test.pipeline.yml2
-rw-r--r--CHANGELOG.md11
-rw-r--r--Gemfile.lock22
-rw-r--r--VERSION2
-rw-r--r--chef-bin/lib/chef-bin/version.rb2
-rw-r--r--chef-config/lib/chef-config/version.rb2
-rw-r--r--chef-utils/lib/chef-utils/version.rb2
-rw-r--r--lib/chef/http/authenticator.rb2
-rw-r--r--lib/chef/knife/cookbook_upload.rb8
-rw-r--r--lib/chef/resource/execute.rb4
-rw-r--r--lib/chef/version.rb2
-rw-r--r--spec/integration/knife/cookbook_upload_spec.rb27
-rw-r--r--spec/unit/resource/execute_spec.rb10
13 files changed, 68 insertions, 28 deletions
diff --git a/.expeditor/habitat-test.pipeline.yml b/.expeditor/habitat-test.pipeline.yml
index be35d66017..7d2cc8f653 100644
--- a/.expeditor/habitat-test.pipeline.yml
+++ b/.expeditor/habitat-test.pipeline.yml
@@ -38,7 +38,7 @@ steps:
- powershell -File ./scripts/ci/ensure-minimum-viable-hab.ps1
- 'Write-Host "--- :hammer_and_wrench: Installing $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS"'
- hab pkg install $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS
- - powershell -File ./habitat/tests/test.ps1" -PackageIdentifier $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS
+ - powershell -File ./habitat/tests/test.ps1 -PackageIdentifier $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS
expeditor:
executor:
windows:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 89062085b2..a4ef31545c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,16 +1,19 @@
<!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
-<!-- latest_release 16.3.3 -->
-## [v16.3.3](https://github.com/chef/chef/tree/v16.3.3) (2020-07-13)
+<!-- latest_release 16.3.7 -->
+## [v16.3.7](https://github.com/chef/chef/tree/v16.3.7) (2020-07-14)
#### Merged Pull Requests
-- Test and Promote Habitat builds on Linux [#10102](https://github.com/chef/chef/pull/10102) ([christopher-snapp](https://github.com/christopher-snapp))
-- Fix two warnings in tests. [#10150](https://github.com/chef/chef/pull/10150) ([phiggins](https://github.com/phiggins))
+- Bump the server api version to 2 [#10140](https://github.com/chef/chef/pull/10140) ([lamont-granquist](https://github.com/lamont-granquist))
<!-- latest_release -->
<!-- release_rollup since=16.2.73 -->
### Changes not yet released to stable
#### Merged Pull Requests
+- Bump the server api version to 2 [#10140](https://github.com/chef/chef/pull/10140) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 16.3.7 -->
+- Fixed `knife cookbook upload -o` windows path issue [#10146](https://github.com/chef/chef/pull/10146) ([antima-gupta](https://github.com/antima-gupta)) <!-- 16.3.6 -->
+- Fix execute resource with integer user parameter. [#10157](https://github.com/chef/chef/pull/10157) ([phiggins](https://github.com/phiggins)) <!-- 16.3.5 -->
+- Fix extra quote in habitat test pipeline config [#10156](https://github.com/chef/chef/pull/10156) ([christopher-snapp](https://github.com/christopher-snapp)) <!-- 16.3.4 -->
- Test and Promote Habitat builds on Linux [#10102](https://github.com/chef/chef/pull/10102) ([christopher-snapp](https://github.com/christopher-snapp)) <!-- 16.3.3 -->
- Fix two warnings in tests. [#10150](https://github.com/chef/chef/pull/10150) ([phiggins](https://github.com/phiggins)) <!-- 16.3.2 -->
- Don&#39;t run the dnf test that Windows doesn&#39;t like on Windows. [#10149](https://github.com/chef/chef/pull/10149) ([phiggins](https://github.com/phiggins)) <!-- 16.3.2 -->
diff --git a/Gemfile.lock b/Gemfile.lock
index a8897ae26e..d27ba968ea 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -28,12 +28,12 @@ GIT
PATH
remote: .
specs:
- chef (16.3.3)
+ chef (16.3.7)
addressable
bcrypt_pbkdf (= 1.1.0.rc1)
bundler (>= 1.10)
- chef-config (= 16.3.3)
- chef-utils (= 16.3.3)
+ chef-config (= 16.3.7)
+ chef-utils (= 16.3.7)
chef-vault
chef-zero (>= 14.0.11)
diff-lcs (>= 1.2.4, < 1.4.0)
@@ -62,12 +62,12 @@ PATH
train-winrm (>= 0.2.5)
tty-screen (~> 0.6)
uuidtools (~> 2.1.5)
- chef (16.3.3-universal-mingw32)
+ chef (16.3.7-universal-mingw32)
addressable
bcrypt_pbkdf (= 1.1.0.rc1)
bundler (>= 1.10)
- chef-config (= 16.3.3)
- chef-utils (= 16.3.3)
+ chef-config (= 16.3.7)
+ chef-utils (= 16.3.7)
chef-vault
chef-zero (>= 14.0.11)
diff-lcs (>= 1.2.4, < 1.4.0)
@@ -112,15 +112,15 @@ PATH
PATH
remote: chef-bin
specs:
- chef-bin (16.3.3)
- chef (= 16.3.3)
+ chef-bin (16.3.7)
+ chef (= 16.3.7)
PATH
remote: chef-config
specs:
- chef-config (16.3.3)
+ chef-config (16.3.7)
addressable
- chef-utils (= 16.3.3)
+ chef-utils (= 16.3.7)
fuzzyurl
mixlib-config (>= 2.2.12, < 4.0)
mixlib-shellout (>= 2.0, < 4.0)
@@ -129,7 +129,7 @@ PATH
PATH
remote: chef-utils
specs:
- chef-utils (16.3.3)
+ chef-utils (16.3.7)
GEM
remote: https://rubygems.org/
diff --git a/VERSION b/VERSION
index 705ca2a9fe..88ba9a2cc9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-16.3.3 \ No newline at end of file
+16.3.7 \ No newline at end of file
diff --git a/chef-bin/lib/chef-bin/version.rb b/chef-bin/lib/chef-bin/version.rb
index daa6819c92..5b83ee0de8 100644
--- a/chef-bin/lib/chef-bin/version.rb
+++ b/chef-bin/lib/chef-bin/version.rb
@@ -21,7 +21,7 @@
module ChefBin
CHEFBIN_ROOT = File.expand_path("..", __dir__)
- VERSION = "16.3.3".freeze
+ VERSION = "16.3.7".freeze
end
#
diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb
index 68b433f6b1..18fe3d257a 100644
--- a/chef-config/lib/chef-config/version.rb
+++ b/chef-config/lib/chef-config/version.rb
@@ -15,5 +15,5 @@
module ChefConfig
CHEFCONFIG_ROOT = File.expand_path("..", __dir__)
- VERSION = "16.3.3".freeze
+ VERSION = "16.3.7".freeze
end
diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb
index 8dd3c455d5..33c4022b3f 100644
--- a/chef-utils/lib/chef-utils/version.rb
+++ b/chef-utils/lib/chef-utils/version.rb
@@ -15,5 +15,5 @@
module ChefUtils
CHEFUTILS_ROOT = File.expand_path("..", __dir__)
- VERSION = "16.3.3".freeze
+ VERSION = "16.3.7".freeze
end
diff --git a/lib/chef/http/authenticator.rb b/lib/chef/http/authenticator.rb
index c93c8121bc..e65e93d2ac 100644
--- a/lib/chef/http/authenticator.rb
+++ b/lib/chef/http/authenticator.rb
@@ -24,7 +24,7 @@ class Chef
class HTTP
class Authenticator
- DEFAULT_SERVER_API_VERSION = "1".freeze
+ DEFAULT_SERVER_API_VERSION = "2".freeze
attr_reader :signing_key_filename
attr_reader :raw_key
diff --git a/lib/chef/knife/cookbook_upload.rb b/lib/chef/knife/cookbook_upload.rb
index 14e8419bec..5a46972b43 100644
--- a/lib/chef/knife/cookbook_upload.rb
+++ b/lib/chef/knife/cookbook_upload.rb
@@ -34,10 +34,10 @@ class Chef
banner "knife cookbook upload [COOKBOOKS...] (options)"
option :cookbook_path,
- short: "-o PATH:PATH",
- long: "--cookbook-path PATH:PATH",
- description: "A colon-separated path to look for cookbooks in.",
- proc: lambda { |o| o.split(":") }
+ short: "-o 'PATH:PATH'",
+ long: "--cookbook-path 'PATH:PATH'",
+ description: "A delimited path to search for cookbooks. On Unix the delimiter is ':', on Windows it is ';'.",
+ proc: lambda { |o| o.split(File::PATH_SEPARATOR) }
option :freeze,
long: "--freeze",
diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb
index 2584a6e4b5..ff2043596b 100644
--- a/lib/chef/resource/execute.rb
+++ b/lib/chef/resource/execute.rb
@@ -630,11 +630,11 @@ class Chef
end
# if domain is provided in both username and domain
- if specified_user && ((specified_user.include? '\\') || (specified_user.include? "@")) && specified_domain
+ if specified_user.kind_of?(String) && ((specified_user.include? '\\') || (specified_user.include? "@")) && specified_domain
raise ArgumentError, "The domain is provided twice. Username: `#{specified_user}`, Domain: `#{specified_domain}`. Please specify domain only once."
end
- if ! specified_user.nil? && specified_domain.nil?
+ if specified_user.kind_of?(String) && specified_domain.nil?
# Splitting username of format: Domain\Username
domain_and_user = user.split('\\')
diff --git a/lib/chef/version.rb b/lib/chef/version.rb
index 883f2cddf0..4c25e3ef2b 100644
--- a/lib/chef/version.rb
+++ b/lib/chef/version.rb
@@ -23,7 +23,7 @@ require_relative "version_string"
class Chef
CHEF_ROOT = File.expand_path("..", __dir__)
- VERSION = Chef::VersionString.new("16.3.3")
+ VERSION = Chef::VersionString.new("16.3.7")
end
#
diff --git a/spec/integration/knife/cookbook_upload_spec.rb b/spec/integration/knife/cookbook_upload_spec.rb
index 79a9efbfb7..7139f0accd 100644
--- a/spec/integration/knife/cookbook_upload_spec.rb
+++ b/spec/integration/knife/cookbook_upload_spec.rb
@@ -97,5 +97,32 @@ describe "knife cookbook upload", :workstation do
expect { knife("cookbook upload x -o #{cb_dir}") }.to raise_error(Chef::Exceptions::MetadataNotValid)
end
end
+
+ when_the_repository "has cookbooks at multiple paths" do
+
+ let(:cb_dir_first) do
+ File.join(@repository_dir, "cookbooks")
+ .gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR)
+ end
+
+ let(:cb_dir_second) do
+ File.join(@repository_dir, "test_cookbooks")
+ .gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR)
+ end
+
+ before(:each) do
+ file "cookbooks/x/metadata.rb", cb_metadata("x", "1.0.0")
+ file "test_cookbooks/y/metadata.rb", cb_metadata("y", "1.0.0")
+ end
+
+ it "knife cookbook upload with -o or --cookbook-path" do
+ knife("cookbook upload x y -o #{cb_dir_first}#{File::PATH_SEPARATOR}#{cb_dir_second}").should_succeed stderr: <<~EOM
+ Uploading x [1.0.0]
+ Uploading y [1.0.0]
+ Uploaded 2 cookbooks.
+ EOM
+ end
+
+ end
end
end
diff --git a/spec/unit/resource/execute_spec.rb b/spec/unit/resource/execute_spec.rb
index 6c61beff34..0ce29da965 100644
--- a/spec/unit/resource/execute_spec.rb
+++ b/spec/unit/resource/execute_spec.rb
@@ -63,6 +63,16 @@ describe Chef::Resource::Execute do
expect(identity[:user]).to eq("user")
end
end
+
+ context "when username is passed as an integer" do
+ let(:username) { 499 }
+
+ it "correctly parses the user and domain" do
+ identity = resource.qualify_user(username, password, domain)
+ expect(identity[:domain]).to eq(nil)
+ expect(identity[:user]).to eq(499)
+ end
+ end
end
shared_examples_for "it received valid credentials" do