From 1e8e7d3d2c311de6cec17f04b113cde09caebcc8 Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Tue, 14 Nov 2023 13:24:53 +0000 Subject: [PATCH] Rename kitchen dot files Remove erb from the kitchen files. Signed-off-by: Dan Webb --- .github/workflows/ci.yml | 5 ++-- .kitchen.windows.yml | 33 -------------------- .kitchen.yml | 65 ---------------------------------------- .travis.yml | 57 ----------------------------------- .yamllint | 15 ++++++++++ kitchen.windows.yml | 33 ++++++++++++++++++++ kitchen.yml | 65 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 116 insertions(+), 157 deletions(-) delete mode 100644 .kitchen.windows.yml delete mode 100644 .kitchen.yml delete mode 100644 .travis.yml create mode 100644 .yamllint create mode 100644 kitchen.windows.yml create mode 100644 kitchen.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a80ab98..6b20795d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,10 @@ jobs: chefstyle: runs-on: ubuntu-latest + continue-on-error: true strategy: matrix: - ruby: ["2.7"] + ruby: ["3.1"] name: Chefstyle on Ruby ${{ matrix.ruby }} steps: - uses: actions/checkout@v2 @@ -47,7 +48,7 @@ jobs: - run: bundle exec rake spec integration-windows: - name: Integration test on Windows + name: ${{matrix.suite}} $${{matrix.os}}} runs-on: windows-latest needs: unit strategy: diff --git a/.kitchen.windows.yml b/.kitchen.windows.yml deleted file mode 100644 index b58b915d..00000000 --- a/.kitchen.windows.yml +++ /dev/null @@ -1,33 +0,0 @@ -<% # Make sure the local copy of the driver is loaded %> -<% lib = File.expand_path('../lib', __FILE__) %> -<% $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) %> ---- -driver: - name: docker - provision_command: - - powershell -ExecutionPolicy Bypass -NoLogo -Command . { iwr -useb https://omnitruck.chef.io/install.ps1 } ^| iex; install - - powershell -Command $path=$env:Path + ';c:\opscode\chef\embedded\bin'; Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $path - -transport: - name: docker - socket: tcp://localhost:2375 - -provisioner: - name: dummy - -platforms: -- name: windows - driver_config: - image: mcr.microsoft.com/windows/servercore:1809 - platform: windows - -suites: -- name: default -- name: context - driver: - build_context: false -- name: inspec - driver: - provision_command: echo 1 - verifier: - name: inspec diff --git a/.kitchen.yml b/.kitchen.yml deleted file mode 100644 index ab46fa87..00000000 --- a/.kitchen.yml +++ /dev/null @@ -1,65 +0,0 @@ -<% # Make sure the local copy of the driver is loaded %> -<% lib = File.expand_path('../lib', __FILE__) %> -<% $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) %> ---- -driver: - name: docker - provision_command: curl -L https://www.chef.io/chef/install.sh | bash - -transport: - name: docker - -provisioner: - name: dummy - -platforms: -- name: amazonlinux-2 -- name: ubuntu-18.04 -- name: ubuntu-20.04 -- name: fedora-latest - driver: - provision_command: - - yum install libxcrypt-compat -y - - curl -L https://www.chef.io/chef/install.sh | bash -- name: centos-7 -- name: oraclelinux-7 -- name: rockylinux-8 -- name: debian-9 -- name: debian-10 -- name: opensuse-15 - driver: - image: opensuse/leap:15 -- name: dockerfile - driver: - username: dockerfile - password: dockerfile - dockerfile: test/Dockerfile - run_command: /sbin/init - -suites: -- name: default - excludes: [arch, debian-9] -- name: context - excludes: [arch, debian-9] - driver: - build_context: false -- name: capabilities - includes: [debian-10,ubuntu-18.04,ubuntu-20.04] - driver: - provision_command: - - curl -L https://www.chef.io/chef/install.sh | bash - - apt-get install -y net-tools - cap_drop: - - NET_ADMIN -- name: arm64 - excludes: [debian-9] - driver: - docker_platform: linux/arm64 -- name: amd64 - driver: - docker_platform: linux/amd64 -- name: inspec - driver: - provision_command: true - verifier: - name: inspec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 065c8340..00000000 --- a/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -matrix: - include: - - os: linux - rvm: 2.4.9 - dist: xenial - language: ruby - cache: bundler - script: - - bundle exec docker version - - bundle exec kitchen --version - - bundle exec rake spec - - bundle exec kitchen test -d always - - os: linux - rvm: 2.5.7 - dist: xenial - language: ruby - cache: bundler - script: - - bundle exec docker version - - bundle exec kitchen --version - - bundle exec rake spec - - bundle exec kitchen test -d always - - os: linux - rvm: 2.6.5 - dist: xenial - language: ruby - cache: bundler - script: - - bundle exec docker version - - bundle exec kitchen --version - - bundle exec rake spec - - bundle exec kitchen test -d always - - os: windows - language: bash - install: - - choco uninstall ruby - - choco install ruby --version=2.6.5.1 - - export PATH=$(echo "$PATH" | sed -e 's/:\/c\/tools\/ruby27\/bin//') - - export PATH=$PATH:/c/tools/ruby26/bin - - choco install mingw - - choco install msys2 - - ridk.cmd exec pacman -S --noconfirm --needed base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-libxslt - script: - - if [[ $(tasklist | grep "gpg-agent") ]]; then taskkill -IM "gpg-agent.exe" -F; else echo "Process gpg-agent not found. Skipping."; fi - - powershell -ExecutionPolicy Bypass -NoLogo -File docker.ps1 - - export KITCHEN_YAML=.kitchen.windows.yml - - ruby -v - - gem install bundler - - bundle config build.nokogiri --use-system-libraries - - bundle install - - bundle exec docker version - - bundle exec kitchen --version - - bundle exec rake spec - - bundle exec kitchen test -d always - -services: -- docker diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000..0046b237 --- /dev/null +++ b/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default +rules: + line-length: + max: 256 + level: warning + document-start: disable + braces: + forbid: false + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + comments: + min-spaces-from-content: 1 diff --git a/kitchen.windows.yml b/kitchen.windows.yml new file mode 100644 index 00000000..ef520bd1 --- /dev/null +++ b/kitchen.windows.yml @@ -0,0 +1,33 @@ +# <% # Make sure the local copy of the driver is loaded %> +# <% lib = File.expand_path('../lib', __FILE__) %> +# <% $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) %> +--- +driver: + name: docker + provision_command: + - powershell -ExecutionPolicy Bypass -NoLogo -Command . { iwr -useb https://omnitruck.chef.io/install.ps1 } ^| iex; install + - powershell -Command $path=$env:Path + ';c:\opscode\chef\embedded\bin'; Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $path + +transport: + name: docker + socket: tcp://localhost:2375 + +provisioner: + name: dummy + +platforms: + - name: windows + driver_config: + image: mcr.microsoft.com/windows/servercore:1809 + platform: windows + +suites: + - name: default + - name: context + driver: + build_context: false + - name: inspec + driver: + provision_command: echo 1 + verifier: + name: inspec diff --git a/kitchen.yml b/kitchen.yml new file mode 100644 index 00000000..f3579dfe --- /dev/null +++ b/kitchen.yml @@ -0,0 +1,65 @@ +# <% # Make sure the local copy of the driver is loaded %> +# <% lib = File.expand_path('../lib', __FILE__) %> +# <% $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) %> +--- +driver: + name: docker + provision_command: curl -L https://www.chef.io/chef/install.sh | bash + +transport: + name: docker + +provisioner: + name: dummy + +platforms: + - name: amazonlinux-2 + - name: ubuntu-18.04 + - name: ubuntu-20.04 + - name: fedora-latest + driver: + provision_command: + - yum install libxcrypt-compat -y + - curl -L https://www.chef.io/chef/install.sh | bash + - name: centos-7 + - name: oraclelinux-7 + - name: rockylinux-8 + - name: debian-9 + - name: debian-10 + - name: opensuse-15 + driver: + image: opensuse/leap:15 + - name: dockerfile + driver: + username: dockerfile + password: dockerfile + dockerfile: test/Dockerfile + run_command: /sbin/init + +suites: + - name: default + excludes: [arch, debian-9] + - name: context + excludes: [arch, debian-9] + driver: + build_context: false + - name: capabilities + includes: [debian-10, ubuntu-18.04, ubuntu-20.04] + driver: + provision_command: + - curl -L https://www.chef.io/chef/install.sh | bash + - apt-get install -y net-tools + cap_drop: + - NET_ADMIN + - name: arm64 + excludes: [debian-9] + driver: + docker_platform: linux/arm64 + - name: amd64 + driver: + docker_platform: linux/amd64 + - name: inspec + driver: + provision_command: true + verifier: + name: inspec