Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: release please configs #418

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@test-kitchen/maintainers
35 changes: 18 additions & 17 deletions .github/workflows/ci.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: Lint & Unit
name: 'Lint, Unit & Integration Tests'

"on":
pull_request:

jobs:
lint-unit:
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@v0.1.2
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@main

integration-windows:
name: Windows ${{matrix.suite}} ${{matrix.os}}
Expand All @@ -16,16 +16,17 @@ jobs:
fail-fast: false
matrix:
suite: [default]
os: [ubuntu-20.04]
os: [ubuntu-24.04]
ruby: ["3.3"]
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }} -l debug

integration-linux:
name: Linux ${{matrix.suite}} ${{matrix.os}}
Expand All @@ -41,28 +42,27 @@ jobs:
- amd64
- inspec
os:
- amazonlinux-2
- ubuntu-1804
- ubuntu-2004
- amazonlinux-2023
- ubuntu-2204
- ubuntu-2404
- fedora-latest
- centos-7
- oraclelinux-7
- rockylinux-8
- debian-11
- almalinux-9
- rockylinux-9
- debian-12
- opensuse-15
- dockerfile
ruby: ["3.3"]
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }} -l debug

integration-capabilities:
name: Linux ${{matrix.suite}} ${{matrix.os}}
Expand All @@ -73,13 +73,14 @@ jobs:
matrix:
suite:
- capabilities
os: [debian-11, ubuntu-1804, ubuntu-2004]
os: [debian-12, ubuntu-2204, ubuntu-2404]
ruby: ["3.3"]
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }} -l debug
5 changes: 1 addition & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: ruby
package-name: kitchen-docker
version-file: lib/kitchen/driver/docker_version.rb
token: ${{ secrets.PORTER_GITHUB_TOKEN }}

- name: Checkout
Expand Down
8 changes: 3 additions & 5 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +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 @@
{
".": "3.2.0"
}
2 changes: 1 addition & 1 deletion kitchen.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ provisioner:
platforms:
- name: windows
driver_config:
image: mcr.microsoft.com/windows/servercore:1809
image: mcr.microsoft.com/windows/servercore:ltsc2022
platform: windows

suites:
Expand Down
12 changes: 5 additions & 7 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ provisioner:

platforms:
- name: amazonlinux-2
- name: ubuntu-18.04
- name: ubuntu-20.04
- name: ubuntu-22.04
- name: ubuntu-24.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-11
- name: almalinux-9
- name: rockylinux-9
- name: debian-12
- name: opensuse-15
driver:
Expand All @@ -42,7 +40,7 @@ suites:
driver:
build_context: false
- name: capabilities
includes: [debian-11, ubuntu-18.04, ubuntu-20.04]
includes: [debian-12, ubuntu-22.04, ubuntu-24.04]
driver:
provision_command:
- curl -L https://www.chef.io/chef/install.sh | bash
Expand Down
24 changes: 12 additions & 12 deletions lib/docker/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

begin
require "docker"

# Override API_VERSION constant in docker-api gem to use version 1.24 of the Docker API
# This override is for the docker-api gem to communicate to the Docker engine on Windows
module Docker
VERSION = "0.0.0".freeze
API_VERSION = "1.24".freeze
end
rescue LoadError => e
logger.debug("[Docker] docker-api gem not found for InSpec verifier. #{e}")
end
# begin
# require "docker"
#
# # Override API_VERSION constant in docker-api gem to use version 1.24 of the Docker API
# # This override is for the docker-api gem to communicate to the Docker engine on Windows
# module Docker
# VERSION = "0.0.0".freeze
# API_VERSION = "1.24".freeze
# end
# rescue LoadError => e
# logger.debug("[Docker] docker-api gem not found for InSpec verifier. #{e}")
# end
4 changes: 2 additions & 2 deletions lib/kitchen/transport/docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

require_relative "../docker/helpers/inspec_helper"

require_relative "../../docker/version"
# require_relative "../../docker/version"
require_relative "../../train/docker"

module Kitchen
module Transport
class Docker < Kitchen::Transport::Base
class DockerFailed < TransportFailed; end

kitchen_transport_api_version 1
# kitchen_transport_api_version 1
plugin_version Kitchen::VERSION

default_config :binary, "docker"
Expand Down
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-docker",
"changelog-path": "CHANGELOG.md",
"release-type": "ruby",
"include-component-in-tag": false,
"version-file": "lib/kitchen/docker/docker_version.rb"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
2 changes: 1 addition & 1 deletion test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM centos:7
FROM almalinux:latest
RUN yum clean all
RUN yum install -y sudo openssh-server openssh-clients which curl htop
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
Expand Down
12 changes: 6 additions & 6 deletions test/integration/default/disabled/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# limitations under the License.
#

# Disable now busser-serever is gone.
# require 'serverspec'
# require 'spec_helper'

# # Just make sure the image launched and is reachable.
# describe command('true') do
# Disable now busser-server is gone.
# require "serverspec"
# require "spec_helper"
#
# Just make sure the image launched and is reachable.
# describe command("true") do
# its(:exit_status) { is_expected.to eq 0 }
# end
Loading