Skip to content

Commit

Permalink
Merge branch 'main' into testing-cookbook-idempotency
Browse files Browse the repository at this point in the history
  • Loading branch information
damacus authored Oct 3, 2023
2 parents 1538f6c + 379436e commit 10855f2
Show file tree
Hide file tree
Showing 31 changed files with 453 additions and 164 deletions.
10 changes: 0 additions & 10 deletions .circleci/config.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .delivery/project.toml

This file was deleted.

57 changes: 19 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,38 @@ name: ci
- main

jobs:
delivery:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run Chef Delivery
uses: actionshub/chef-delivery@main
env:
CHEF_LICENSE: accept-no-persist

yamllint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run yaml Lint
uses: actionshub/yamllint@main

mdl:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run Markdown Lint
uses: actionshub/markdownlint@main
lint-unit:
uses: sous-chefs/.github/.github/workflows/[email protected]

integration:
needs: [mdl, yamllint, delivery]
needs: lint-unit
runs-on: ubuntu-latest
strategy:
matrix:
os:
- 'amazonlinux-2'
- 'centos-7'
- 'centos-8'
- 'debian-9'
- 'ubuntu-1604'
- 'ubuntu-1804'
- "almalinux-8"
- "amazonlinux-2"
- "centos-7"
- "centos-stream-8"
- "debian-10"
- "debian-11"
- "fedora-latest"
- "rockylinux-8"
- "ubuntu-1804"
- "ubuntu-2004"
suite:
- 'server'
- 'server-verification'
- 'server-verify-no-databag'
- "server"
- "server-verification"
- "server-verify-no-databag"
fail-fast: false

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Chef
uses: actionshub/chef-install@main
uses: actionshub/chef-install@2.0.4
- name: Dokken
uses: actionshub/test-kitchen@main
uses: actionshub/test-kitchen@2.1.0
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.dokken.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/md-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: markdown-link-check
uses: gaurav-nelson/github-action-markdown-link-check@v1
uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
with:
use-verbose-mode: "yes"
folder-path: "documentation"
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
close-issue-message: >
Expand Down
5 changes: 5 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config:
ul-indent: false # MD007
line-length: false # MD013
no-duplicate-heading: false # MD024
reference-links-images: false # MD052
18 changes: 11 additions & 7 deletions .overcommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@ PreCommit:
enabled: true
YamlLint:
enabled: true
Rspec:
required_executable: "yamllint"
ChefSpec:
enabled: true
required_executable: 'rspec'
required_executable: "chef"
command: ["chef", "exec", "rspec"]
Cookstyle:
enabled: true
required_executable: 'cookstyle'
required_executable: "cookstyle"
command: ["cookstyle"]
Delivery:
enabled: true
required_executable: 'delivery'
flags: ['local', 'all']
MarkdownLint:
enabled: false
required_executable: "npx"
command: ["npx", "markdownlint-cli2", "'**/*.md'"]
include: ["**/*.md"]

CommitMsg:
HardTabs:
enabled: true
7 changes: 4 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"recommendations": [
"chef-software.chef",
"rebornix.ruby",
"editorconfig.editorconfig"
"chef-software.chef",
"rebornix.ruby",
"editorconfig.editorconfig",
"DavidAnson.vscode-markdownlint"
]
}
2 changes: 2 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ rules:
max-spaces-inside: 1
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
comments:
min-spaces-from-content: 1
75 changes: 75 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,81 @@ This file is used to list changes made in each version of the openvpn cookbook.

- Added idempotency checks on CI

## 7.0.16 - *2023-09-29*

## 7.0.15 - *2023-09-11*

## 7.0.14 - *2023-05-16*

## 7.0.13 - *2023-04-17*

## 7.0.12 - *2023-04-07*

Standardise files with files in sous-chefs/repo-management

## 7.0.11 - *2023-04-01*

## 7.0.10 - *2023-04-01*

## 7.0.9 - *2023-04-01*

Standardise files with files in sous-chefs/repo-management

## 7.0.8 - *2023-03-20*

Standardise files with files in sous-chefs/repo-management

## 7.0.7 - *2023-03-15*

Standardise files with files in sous-chefs/repo-management

## 7.0.6 - *2023-03-01*

- Switch from mdl to markdownlint-cli2
- Update workflows

## 7.0.5 - *2023-02-16*

## 7.0.4 - *2023-02-16*

Standardise files with files in sous-chefs/repo-management

## 7.0.3 - *2023-02-15*

Standardise files with files in sous-chefs/repo-management

## 7.0.2 - *2022-12-09*

Standardise files with files in sous-chefs/repo-management

## 7.0.1 - *2022-05-16*

- Standardise files with files in sous-chefs/repo-management

## 7.0.0 - *2022-05-07*

- Remove comp-lzo as a default option

## 6.1.0 - *2022-02-24*

- Add certificate properties to user resource

## 6.0.0 - *2022-02-08*

- Remove delivery and move to calling RSpec directly via a reusable workflow
- Update tested platforms
- Fix Fedora
- Standardize kitchen settings
- Enable unified_mode and require Chef >= 15.3
- Fix various idempotency issues
- Set umask to 077 to match file permissions we expect
- Trigger various resources to run during first converge phase

## 5.4.0 - *2022-01-18*

- resolved cookstyle error: recipes/server.rb:88:3 refactor: `Chef/RedundantCode/UseCreateIfMissing`
- resolved cookstyle error: recipes/server.rb:98:3 refactor: `Chef/RedundantCode/UseCreateIfMissing`

## 5.3.2 - *2021-08-30*

- Standardise files with files in sous-chefs/repo-management
Expand Down
1 change: 0 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
default['openvpn']['config']['up'] = [node['openvpn']['fs_prefix'], '/etc/openvpn/server.up.sh'].join
default['openvpn']['config']['persist-key'] = ''
default['openvpn']['config']['persist-tun'] = ''
default['openvpn']['config']['comp-lzo'] = ''

default['openvpn']['config']['ca'] = node['openvpn']['signing_ca_cert']
default['openvpn']['config']['key'] = "#{node['openvpn']['key_dir']}/server.key"
Expand Down
2 changes: 1 addition & 1 deletion chefignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Dangerfile
examples/*
features/*
Guardfile
kitchen.yml*
kitchen*.yml
mlc_config.json
Procfile
Rakefile
Expand Down
113 changes: 113 additions & 0 deletions kitchen.dokken.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
driver:
name: dokken
privileged: true
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>

transport: { name: dokken }
provisioner: { name: dokken }

platforms:
- name: almalinux-8
driver:
image: dokken/almalinux-8
pid_one_command: /usr/lib/systemd/systemd

- name: almalinux-9
driver:
image: dokken/almalinux-9
pid_one_command: /usr/lib/systemd/systemd

- name: amazonlinux-2023
driver:
image: dokken/amazonlinux-2023
pid_one_command: /usr/lib/systemd/systemd

- name: centos-7
driver:
image: dokken/centos-7
pid_one_command: /usr/lib/systemd/systemd

- name: centos-stream-8
driver:
image: dokken/centos-stream-8
pid_one_command: /usr/lib/systemd/systemd

- name: centos-stream-9
driver:
image: dokken/centos-stream-9
pid_one_command: /usr/lib/systemd/systemd

- name: debian-9
driver:
image: dokken/debian-9
pid_one_command: /bin/systemd

- name: debian-10
driver:
image: dokken/debian-10
pid_one_command: /bin/systemd

- name: debian-11
driver:
image: dokken/debian-11
pid_one_command: /bin/systemd

- name: debian-12
driver:
image: dokken/debian-12
pid_one_command: /bin/systemd

- name: fedora-latest
driver:
image: dokken/fedora-latest
pid_one_command: /usr/lib/systemd/systemd

- name: opensuse-leap-15
driver:
image: dokken/opensuse-leap-15
pid_one_command: /usr/lib/systemd/systemd

- name: oraclelinux-7
driver:
image: dokken/oraclelinux-7
pid_one_command: /usr/lib/systemd/systemd

- name: oraclelinux-8
driver:
image: dokken/oraclelinux-8
pid_one_command: /usr/lib/systemd/systemd

- name: oraclelinux-9
driver:
image: dokken/oraclelinux-9
pid_one_command: /usr/lib/systemd/systemd

- name: rockylinux-8
driver:
image: dokken/rockylinux-8
pid_one_command: /usr/lib/systemd/systemd

- name: rockylinux-9
driver:
image: dokken/rockylinux-9
pid_one_command: /usr/lib/systemd/systemd

- name: ubuntu-18.04
driver:
image: dokken/ubuntu-18.04
pid_one_command: /bin/systemd

- name: ubuntu-20.04
driver:
image: dokken/ubuntu-20.04
pid_one_command: /bin/systemd

- name: ubuntu-22.04
driver:
image: dokken/ubuntu-22.04
pid_one_command: /bin/systemd

- name: ubuntu-23.04
driver:
image: dokken/ubuntu-23.04
pid_one_command: /bin/systemd
7 changes: 7 additions & 0 deletions kitchen.exec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
driver: { name: exec }
transport: { name: exec }

platforms:
- name: macos-latest
- name: windows-latest
Loading

0 comments on commit 10855f2

Please sign in to comment.