Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Stromweld authored Jul 1, 2024
2 parents b0d885b + bcc11c6 commit 82fead7
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 18 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
---
name: 'Test'
name: 'Lint, Unit & Integration Tests'

'on':
pull_request:

jobs:
lint-unit:
uses: test-kitchen/.github/.github/workflows/[email protected]
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@main

integration:
runs-on: ubuntu-latest
needs: lint-unit
name: Kitchen Verify
strategy:
matrix:
ruby: ["3.3"]
os: ["almalinux-9"]
steps:
- name: Install Vagrant VirtualBox
run: |
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | sudo tee /usr/share/keyrings/oracle-virtualbox-2016.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
echo "deb [signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt-get update
sudo apt-get install -y software-properties-common vagrant virtualbox-7.0
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Kitchen Verify
run: |
export LOGNAME=$USER
bundle exec kitchen verify default-${{ matrix.os}}
env:
CHEF_LICENSE: "accept-no-persist"
11 changes: 4 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
---
name: release-please

"on":
push:
branches:
- main
branches: [main]

name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: ruby
package-name: kitchen-vagrant
version-file: lib/kitchen/driver/vagrant_version.rb
token: ${{ secrets.PORTER_GITHUB_TOKEN }}

- name: Checkout
Expand Down
7 changes: 2 additions & 5 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
default: true
MD004: false
MD012: false
MD013: false
MD024: false
MD026: false
MD036: false
MD012: false
MD029: false
MD004: false
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "2.0.1"
}
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ require:
- chefstyle

AllCops:
TargetRubyVersion: 3.0
Include:
- "**/*.rb"
Exclude:
Expand Down
4 changes: 4 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

rules:
line-length: disable
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [1.14.3](https://github.com/test-kitchen/kitchen-vagrant/compare/v1.14.2...v1.14.3) (2024-06-19)


### Bug Fixes

* update release please configs ([#498](https://github.com/test-kitchen/kitchen-vagrant/issues/498)) ([823b495](https://github.com/test-kitchen/kitchen-vagrant/commit/823b49527ee8ddb69cdd52ca77a4cb3dc7946382))

## [2.0.0](https://github.com/test-kitchen/kitchen-vagrant/compare/v1.14.2...v2.0.0) (2024-02-14)

- Require Vagrant 2.4 or later
Expand Down Expand Up @@ -223,7 +230,7 @@

[Full Changelog](https://github.com/test-kitchen/kitchen-vagrant/compare/v1.1.0...v1.1.1)

**Fixed Bugs**
### Fixed Bugs

- Fix detection of vagrant-winrm plugin. [\#309](https://github.com/test-kitchen/kitchen-vagrant/pull/309) ([silverl](https://github.com/silverl))
- Fix bug in Vagrantfile template related to WinRM options. [\#306](https://github.com/test-kitchen/kitchen-vagrant/pull/306) ([aleksey-hariton](https://github.com/aleksey-hariton))
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ gemspec

group :test do
gem "rake"
gem "kitchen-inspec"
gem "rspec", "~> 3.2"
end

Expand All @@ -14,4 +15,4 @@ end

group :chefstyle do
gem "chefstyle", "2.2.3"
end
end
25 changes: 25 additions & 0 deletions kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
driver:
name: vagrant

provisioner:
name: shell
command: 'echo "Hello, World!"'

verifier:
name: inspec

platforms:
- name: almalinux-9
- name: ubuntu-24.04
- name: windows-2022
driver:
box: stromweld/windows-2022
customize:
memory: 4096

suites:
- name: default
verifier:
inspec_tests:
- test/integration/default
2 changes: 1 addition & 1 deletion lib/kitchen/driver/vagrant_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ module Kitchen
module Driver

# Version string for Vagrant Kitchen driver
VAGRANT_VERSION = "2.0.0".freeze
VAGRANT_VERSION = "2.0.1".freeze
end
end
12 changes: 12 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"packages": {
".": {
"package-name": "kitchen-vagrant",
"changelog-path": "CHANGELOG.md",
"release-type": "ruby",
"include-component-in-tag": false,
"version-file": "lib/kitchen/driver/vagrant_version.rb"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
9 changes: 9 additions & 0 deletions test/integration/default/default_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Chef InSpec test for kitchen-vagrant

# The Chef InSpec reference, with examples and extensive documentation, can be
# found at https://docs.chef.io/inspec/resources/

user_name = os.windows? ? "Administrator" : "root"
describe user(user_name) do
it { should exist }
end

0 comments on commit 82fead7

Please sign in to comment.