summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-07-11 08:52:15 -0700
committerJohn McCrae <john.mccrae@progress.com>2022-07-11 08:52:15 -0700
commitfdf66c8aa5ad51ae4b54383ad72d2924020b0e22 (patch)
treee3e1f325511dd0b42b7e777c25fed07def0d30ca
parent24b5536e60c6852cdb0affadb7ca06efbcf2d0d9 (diff)
downloadchef-fdf66c8aa5ad51ae4b54383ad72d2924020b0e22.tar.gz
starting to integrate ruby 3.1 into the builds
Signed-off-by: John McCrae <john.mccrae@progress.com>
-rw-r--r--.expeditor/verify.pipeline.yml60
-rw-r--r--.github/workflows/kitchen.yml2
-rw-r--r--Gemfile.lock27
-rw-r--r--chef-universal-mingw-ucrt.gemspec14
-rw-r--r--chef.gemspec9
-rw-r--r--spec/integration/client/client_spec.rb2
-rw-r--r--spec/integration/recipes/use_partial_spec.rb1
7 files changed, 73 insertions, 42 deletions
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
index 14b168661f..7c968119dd 100644
--- a/.expeditor/verify.pipeline.yml
+++ b/.expeditor/verify.pipeline.yml
@@ -15,31 +15,31 @@ steps:
# Tests Ruby 2.6
#########################################################################
-- label: "chef-utils Unit :ruby: 2.6"
- commands:
- - /workdir/.expeditor/scripts/bk_container_prep.sh
- - cd chef-utils
- - bundle config set --local without omnibus_package
- - bundle config set --local path 'vendor/bundle'
- - bundle install --jobs=3 --retry=3
- - bundle exec rake spec
- expeditor:
- executor:
- docker:
- image: rubydistros/ubuntu-18.04:2.6
-
-- label: "chef-config Unit :ruby: 2.6"
- commands:
- - /workdir/.expeditor/scripts/bk_container_prep.sh
- - cd chef-config
- - bundle config set --local without omnibus_package
- - bundle config set --local path 'vendor/bundle'
- - bundle install --jobs=3 --retry=3
- - bundle exec rake spec
- expeditor:
- executor:
- docker:
- image: rubydistros/ubuntu-18.04:2.6
+# - label: "chef-utils Unit :ruby: 2.6"
+# commands:
+# - /workdir/.expeditor/scripts/bk_container_prep.sh
+# - cd chef-utils
+# - bundle config set --local without omnibus_package
+# - bundle config set --local path 'vendor/bundle'
+# - bundle install --jobs=3 --retry=3
+# - bundle exec rake spec
+# expeditor:
+# executor:
+# docker:
+# image: rubydistros/ubuntu-18.04:2.6
+
+# - label: "chef-config Unit :ruby: 2.6"
+# commands:
+# - /workdir/.expeditor/scripts/bk_container_prep.sh
+# - cd chef-config
+# - bundle config set --local without omnibus_package
+# - bundle config set --local path 'vendor/bundle'
+# - bundle install --jobs=3 --retry=3
+# - bundle exec rake spec
+# expeditor:
+# executor:
+# docker:
+# image: rubydistros/ubuntu-18.04:2.6
#########################################################################
# Tests Ruby 3.1
@@ -264,7 +264,7 @@ steps:
docker:
image: rubydistros/almalinux-8:3.1
-- label: "Functional Windows :ruby: 2.7"
+- label: "Functional Windows :ruby: 3.1?"
commands:
- .expeditor/scripts/bk_win_functional.ps1
expeditor:
@@ -274,27 +274,27 @@ steps:
single-use: true
shell: ["powershell", "-Command"]
-- label: "Integration Windows :ruby: 3.0"
+- label: "Integration Windows :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_win_integration.ps1
expeditor:
executor:
docker:
host_os: windows
- image: rubydistros/windows-2019:3.0
+ image: rubydistros/windows-2019:3.1
environment:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
shell: ["powershell", "-Command"]
-- label: "Unit Windows :ruby: 3.0"
+- label: "Unit Windows :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_win_unit.ps1
expeditor:
executor:
docker:
host_os: windows
- image: rubydistros/windows-2019:3.0
+ image: rubydistros/windows-2019:3.1
environment:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
diff --git a/.github/workflows/kitchen.yml b/.github/workflows/kitchen.yml
index 126c7a5e57..7c8b535092 100644
--- a/.github/workflows/kitchen.yml
+++ b/.github/workflows/kitchen.yml
@@ -139,7 +139,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
- ruby-version: "3.0"
+ ruby-version: "3.1"
bundler-cache: true
working-directory: kitchen-tests
- name: Run Test Kitchen
diff --git a/Gemfile.lock b/Gemfile.lock
index a36a9db49f..59e9198f28 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -50,7 +50,7 @@ PATH
addressable
aws-sdk-s3 (~> 1.91)
aws-sdk-secretsmanager (~> 1.46)
- chef-config (= 18.0.127)
+ chef-config (= 18.0.130)
chef-powershell (~> 1.0.12)
chef-utils (= 18.0.130)
chef-vault
@@ -63,6 +63,7 @@ PATH
ffi-yajl (~> 2.2)
iniparse (~> 1.4)
inspec-core (~> 4.23)
+ iso8601 (>= 0.12.1, < 0.14)
license-acceptance (>= 1.0.5, < 3)
mixlib-archive (>= 0.4, < 2.0)
mixlib-authentication (>= 2.1, < 4)
@@ -82,8 +83,15 @@ PATH
uuidtools (>= 2.1.5, < 3.0)
vault (~> 0.16)
win32-api (~> 1.10.0)
+ win32-certstore (~> 0.6.15)
+ win32-event (~> 0.6.1)
+ win32-eventlog (= 0.6.3)
win32-mmap (~> 0.4.1)
win32-mutex (~> 0.4.2)
+ win32-process (~> 0.9)
+ win32-service (>= 2.1.5, < 3.0)
+ win32-taskscheduler (~> 2.0)
+ wmi-lite (~> 1.0)
PATH
remote: chef-bin
@@ -236,6 +244,7 @@ GEM
inspec-core-bin (4.56.20)
inspec-core (= 4.56.20)
ipaddress (0.8.3)
+ iso8601 (0.13.0)
jmespath (1.6.1)
json (2.6.2)
libyajl2 (2.1.0)
@@ -328,7 +337,7 @@ GEM
rubocop-ast (>= 1.15.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
- rubocop-ast (1.18.0)
+ rubocop-ast (1.19.1)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
@@ -341,6 +350,7 @@ GEM
unicode-display_width (>= 1.5, < 3.0)
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
+ structured_warnings (0.4.0)
syslog-logger (1.6.8)
thor (1.2.1)
time (0.2.0)
@@ -393,6 +403,13 @@ GEM
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.7.0)
win32-api (1.10.1)
+ win32-certstore (0.6.15)
+ chef-powershell (>= 1.0.12)
+ ffi
+ win32-event (0.6.3)
+ win32-ipc (>= 0.6.0)
+ win32-eventlog (0.6.3)
+ ffi
win32-ipc (0.7.0)
ffi
win32-mmap (0.4.2)
@@ -401,6 +418,12 @@ GEM
win32-ipc (>= 0.6.0)
win32-process (0.10.0)
ffi (>= 1.0.0)
+ win32-service (2.3.2)
+ ffi
+ ffi-win32-extensions
+ win32-taskscheduler (2.0.4)
+ ffi
+ structured_warnings
winrm (2.3.6)
builder (>= 2.1.2)
erubi (~> 1.8)
diff --git a/chef-universal-mingw-ucrt.gemspec b/chef-universal-mingw-ucrt.gemspec
index 5edf8a6413..ae57deae2e 100644
--- a/chef-universal-mingw-ucrt.gemspec
+++ b/chef-universal-mingw-ucrt.gemspec
@@ -3,18 +3,18 @@ gemspec = eval(IO.read(File.expand_path("chef.gemspec", __dir__)))
gemspec.platform = Gem::Platform.new(%w{x64-mingw-ucrt})
# gemspec.add_dependency "win32-api", "~> 1.10.0"
-gemspec.add_dependency "win32-event", "~> 0.6.1"
+# gemspec.add_dependency "win32-event", "~> 0.6.1"
# TODO: Relax this pin and make the necessary updaets. The issue originally
# leading to this pin has been fixed in 0.6.5.
-gemspec.add_dependency "win32-eventlog", "0.6.3"
+# gemspec.add_dependency "win32-eventlog", "0.6.3"
# gemspec.add_dependency "win32-mmap", "~> 0.4.1"
# gemspec.add_dependency "win32-mutex", "~> 0.4.2"
-gemspec.add_dependency "win32-process", "~> 0.9"
+# gemspec.add_dependency "win32-process", "~> 0.9"
# gemspec.add_dependency "win32-service", ">= 2.1.5", "< 3.0"
-gemspec.add_dependency "wmi-lite", "~> 1.0"
-gemspec.add_dependency "win32-taskscheduler", "~> 2.0"
-gemspec.add_dependency "iso8601", ">= 0.12.1", "< 0.14" # validate 0.14 when it comes out
-gemspec.add_dependency "win32-certstore", "~> 0.6.15" # 0.5+ required for specifying user vs. system store
+# gemspec.add_dependency "wmi-lite", "~> 1.0"
+# gemspec.add_dependency "win32-taskscheduler", "~> 2.0"
+# gemspec.add_dependency "iso8601", ">= 0.12.1", "< 0.14" # validate 0.14 when it comes out
+# gemspec.add_dependency "win32-certstore", "~> 0.6.15" # 0.5+ required for specifying user vs. system store
# gemspec.add_dependency "chef-powershell", "~> 1.0.12" # The guts of the powershell_exec code have been moved to its own gem, chef-powershell. It's part of the chef-powershell-shim repo.
gemspec.extensions << "ext/win32-eventlog/Rakefile"
gemspec.files += Dir.glob("{distro,ext}/**/*")
diff --git a/chef.gemspec b/chef.gemspec
index eeca2aee77..d5d080826f 100644
--- a/chef.gemspec
+++ b/chef.gemspec
@@ -29,6 +29,15 @@ Gem::Specification.new do |s|
s.add_dependency "win32-mutex", "~> 0.4.2"
s.add_dependency "chef-powershell", "~> 1.0.12"
s.add_dependency "win32-api", "~> 1.10.0"
+ s.add_dependency "win32-service", ">= 2.1.5", "< 3.0"
+ s.add_dependency "win32-event", "~> 0.6.1"
+ s.add_dependency "win32-taskscheduler", "~> 2.0"
+ s.add_dependency "win32-eventlog", "0.6.3"
+ s.add_dependency "win32-process", "~> 0.9"
+ s.add_dependency "wmi-lite", "~> 1.0"
+ s.add_dependency "iso8601", ">= 0.12.1", "< 0.14"
+ s.add_dependency "win32-certstore", "~> 0.6.15"
+ s.extensions << "ext/win32-eventlog/Rakefile"
end
s.add_dependency "chef-config", "= #{Chef::VERSION}"
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb
index f4ed5a69d7..1bd84fa940 100644
--- a/spec/integration/client/client_spec.rb
+++ b/spec/integration/client/client_spec.rb
@@ -688,8 +688,6 @@ describe "chef-client" do
end
it "the chef client run should succeed" do
- require "pry"
- binding.pry
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
command.error!
end
diff --git a/spec/integration/recipes/use_partial_spec.rb b/spec/integration/recipes/use_partial_spec.rb
index 17faf809f8..dd4169512a 100644
--- a/spec/integration/recipes/use_partial_spec.rb
+++ b/spec/integration/recipes/use_partial_spec.rb
@@ -27,6 +27,7 @@ describe "notifying_block" do
when_the_repository "has a cookbook with partial resources" do
before do
+ ::Chef::HTTP::Authenticator.get_cert_password
directory "cookbooks/x" do
file "resources/_shared_properties.rb", <<-EOM
property :content, String