-
-
Notifications
You must be signed in to change notification settings - Fork 792
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add Docker Swarm support New resources: - docker_swarm_init - docker_swarm_join - docker_swarm_service - docker_swarm_token --------- Signed-off-by: Dan Webb <[email protected]>
- Loading branch information
Showing
30 changed files
with
1,279 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: 'Install Chef' | ||
description: 'Installs Chef products on Windows or Linux/macOS' | ||
|
||
inputs: | ||
channel: | ||
description: 'Chef download channel' | ||
required: false | ||
default: 'stable' | ||
project: | ||
description: 'Chef project to download' | ||
required: false | ||
default: 'chef-workstation' | ||
version: | ||
description: 'Version of Chef product' | ||
required: false | ||
license-id: | ||
description: 'Chef license ID' | ||
required: true | ||
windows-path: | ||
description: 'Windows installation path' | ||
required: false | ||
default: 'C:\opscode' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Chef on Linux/macOS | ||
if: runner.os != 'Windows' | ||
shell: bash | ||
run: | | ||
curl -L https://chefdownload-commercial.chef.io/install.sh?license_id=${{ inputs.license-id }} -o chefDownload.sh | ||
sudo chmod +x chefDownload.sh | ||
sudo ./chefDownload.sh -c ${{ inputs.channel }} -P ${{ inputs.project }} ${{ inputs.version && format('-v {0}', inputs.version) }} | ||
rm -f chefDownload.sh | ||
- name: Install Chef on Windows | ||
if: runner.os == 'Windows' | ||
shell: pwsh | ||
run: | | ||
. { iwr -useb https://chefdownload-commercial.chef.io/install.ps1?license_id=${{ inputs.license-id }} } | iex; | ||
install -channel ${{ inputs.channel }} -project ${{ inputs.project }} ${{ inputs.version && format('-version {0}', inputs.version) }} | ||
- name: Add Windows Chef Path | ||
if: runner.os == 'Windows' | ||
shell: pwsh | ||
run: echo "${{ inputs.windows-path }}\bin" >> $env:GITHUB_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: 'Run Test Kitchen' | ||
description: 'Runs Test Kitchen tests with configurable options' | ||
|
||
inputs: | ||
suite: | ||
description: 'Test Kitchen suite to run' | ||
required: false | ||
os: | ||
description: 'Operating system to test' | ||
required: false | ||
kitchen-yaml: | ||
description: 'Kitchen YAML file to use' | ||
required: false | ||
default: 'kitchen.dokken.yml' | ||
chef-version: | ||
description: 'Chef version to use' | ||
required: false | ||
default: 'latest' | ||
license-id: | ||
description: 'Chef license ID' | ||
required: true | ||
kitchen-command: | ||
description: 'Kitchen command to run (test, verify, etc)' | ||
required: false | ||
default: 'test' | ||
channel: | ||
description: 'Chef download channel' | ||
required: false | ||
default: 'stable' | ||
project: | ||
description: 'Chef project to download' | ||
required: false | ||
default: 'chef-workstation' | ||
version: | ||
description: 'Version of Chef product' | ||
required: false | ||
windows-path: | ||
description: 'Windows installation path' | ||
required: false | ||
default: 'C:\opscode' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Chef | ||
uses: ./.github/actions/chef-install | ||
with: | ||
version: ${{ inputs.chef-version }} | ||
license-id: ${{ inputs.license-id }} | ||
|
||
- name: Run Test Kitchen | ||
shell: bash | ||
run: kitchen ${{ inputs.kitchen-command }} ${{ inputs.suite }}${{ inputs.suite && inputs.os && '-' }}${{ inputs.os }} | ||
env: | ||
CHEF_LICENSE: ${{ inputs.license-id }} | ||
KITCHEN_LOCAL_YAML: ${{ inputs.kitchen-yaml }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Setup VirtualBox & Vagrant' | ||
description: 'Installs VirtualBox and Vagrant on Ubuntu runners' | ||
|
||
inputs: | ||
virtualbox-version: | ||
description: 'Version of VirtualBox to install' | ||
required: false | ||
default: '*' | ||
vagrant-version: | ||
description: 'Version of Vagrant to install' | ||
required: false | ||
default: 'latest' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install VirtualBox & Vagrant | ||
shell: bash | ||
run: | | ||
sudo apt update && sudo apt install virtualbox -y | ||
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.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 | ||
sudo apt update && sudo apt install vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,86 +19,86 @@ jobs: | |
|
||
integration: | ||
needs: lint-unit | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
os: | ||
- "almalinux-8" | ||
- "debian-11" | ||
- "debian-12" | ||
- "rockylinux-8" | ||
- "rockylinux-9" | ||
- "ubuntu-2004" | ||
- "ubuntu-2204" | ||
- "ubuntu-2404" | ||
- almalinux-9 | ||
- almalinux-10 | ||
- amazonlinux-2023 | ||
- centos-stream-9 | ||
- centos-stream-10 | ||
- debian-11 | ||
- debian-12 | ||
- ubuntu-2204 | ||
- ubuntu-2404 | ||
suite: | ||
- "installation-script-main" | ||
- "installation-script-test" | ||
- "installation-package" | ||
- "installation-tarball" | ||
- "install-and-stop" | ||
exclude: | ||
- os: debian-11 | ||
suite: installation-script-test | ||
- os: debian-12 | ||
suite: installation-script-test | ||
- os: almalinux-8 | ||
suite: installation-script-main | ||
- os: almalinux-8 | ||
suite: installation-script-test | ||
- os: rockylinux-8 | ||
suite: installation-script-main | ||
- os: rockylinux-8 | ||
suite: installation-script-test | ||
- os: rockylinux-9 | ||
suite: installation-script-main | ||
- os: rockylinux-9 | ||
suite: installation-script-test | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Install Chef | ||
uses: actionshub/[email protected] | ||
- name: Dokken | ||
uses: actionshub/[email protected] | ||
env: | ||
CHEF_VERSION: latest | ||
CHEF_LICENSE: accept-no-persist | ||
KITCHEN_LOCAL_YAML: kitchen.dokken.yml | ||
|
||
- name: Test Kitchen | ||
uses: ./.github/actions/test-kitchen | ||
with: | ||
kitchen-yaml: kitchen.dokken.yml | ||
suite: ${{ matrix.suite }} | ||
os: ${{ matrix.os }} | ||
license-id: ${{ secrets.CHEF_LICENSE_KEY }} | ||
|
||
integration-amazonlinux: | ||
installation-script: | ||
needs: lint-unit | ||
runs-on: ubuntu-24.04 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
os: | ||
- amazonlinux-2 | ||
suite: | ||
- "installation-tarball" | ||
- "install-and-stop" | ||
- centos-stream-9 | ||
- centos-stream-10 | ||
- debian-11 | ||
- debian-12 | ||
- ubuntu-2204 | ||
- ubuntu-2404 | ||
suite: ["installation-script"] | ||
fail-fast: false | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Test Kitchen | ||
uses: ./.github/actions/test-kitchen | ||
with: | ||
kitchen-yaml: kitchen.dokken.yml | ||
suite: ${{ matrix.suite }} | ||
os: ${{ matrix.os }} | ||
license-id: ${{ secrets.CHEF_LICENSE_KEY }} | ||
|
||
swarm: | ||
needs: lint-unit | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-2204"] | ||
suite: ["swarm"] | ||
fail-fast: false | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Install Chef | ||
uses: actionshub/[email protected] | ||
- name: Dokken | ||
uses: actionshub/[email protected] | ||
env: | ||
CHEF_VERSION: latest | ||
CHEF_LICENSE: accept-no-persist | ||
KITCHEN_LOCAL_YAML: kitchen.dokken.yml | ||
|
||
- name: Setup VirtualBox & Vagrant | ||
uses: ./.github/actions/virtualbox-setup | ||
|
||
- name: Test Kitchen | ||
uses: ./.github/actions/test-kitchen | ||
with: | ||
kitchen-yaml: kitchen.yml | ||
suite: ${{ matrix.suite }} | ||
os: ${{ matrix.os }} | ||
license-id: ${{ secrets.CHEF_LICENSE_KEY }} | ||
|
||
integration-smoke: | ||
smoke: | ||
needs: lint-unit | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -108,31 +108,30 @@ jobs: | |
- "almalinux-9" | ||
- "debian-11" | ||
- "debian-12" | ||
- "rockylinux-8" | ||
- "rockylinux-9" | ||
- "ubuntu-2004" | ||
- "ubuntu-2204" | ||
- "ubuntu-2404" | ||
suite: | ||
- "smoke" | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Install VirtualBox & Vagrant | ||
run: | | ||
sudo apt update && sudo apt install virtualbox | ||
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.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 | ||
sudo apt update && sudo apt install vagrant | ||
- name: Install Chef | ||
uses: actionshub/[email protected] | ||
- name: Dokken | ||
uses: actionshub/[email protected] | ||
env: | ||
CHEF_VERSION: latest | ||
CHEF_LICENSE: accept-no-persist | ||
|
||
- name: Setup VirtualBox & Vagrant | ||
uses: ./.github/actions/virtualbox-setup | ||
|
||
- name: Test Kitchen | ||
uses: ./.github/actions/test-kitchen | ||
with: | ||
kitchen-yaml: kitchen.yml | ||
suite: ${{ matrix.suite }} | ||
os: ${{ matrix.os }} | ||
license-id: ${{ secrets.CHEF_LICENSE_KEY }} | ||
|
||
final: | ||
needs: [lint-unit, installation-script, integration, swarm, smoke] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Complete | ||
run: echo "All tests passed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ruby system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.