Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .copier-answers.ssf-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v2.0.1
_commit: v2.4.0
_src_path: https://github.com/dafyddj/copier-ssf-ci
failure_permitted_ignored: []
failure_permitted_patterns: []
formula_name: salt
release_using_gha: false
renovate_extend_presets:
- github>saltstack-formulas/.github
- github>saltstack-formulas/.github:copier
Expand Down
30 changes: 21 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# yamllint disable rule:comments
name: Test & release

'on':
Expand All @@ -20,30 +19,42 @@ jobs:
should-run: ${{ steps.action.outputs.should-run }}
steps:
- id: action
uses:
# yamllint disable-line rule:line-length
techneg-it/should-workflow-run@dcbb88600d59ec2842778ef1e2d41f680f876329 # v1.0.0
# yamllint disable-line rule:line-length
uses: techneg-it/should-workflow-run@eff19348eb884f57e05bc6f05ae48ece3af14714 # v1.0.1
pre-commit:
name: Lint / `pre-commit`
needs: should-run
if: fromJSON(needs.should-run.outputs.should-run)
container: techneg/ci-pre-commit:v2.3.3
container: techneg/ci-pre-commit:v2.4.28@sha256:3a5b362f2fdf60e3a6c614a919c67cc8ae5d34208e287d293fc30c150a919ac6
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- run: | # Needed because of bug #2031 in `actions/checkout`
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
fetch-tags: true
filter: tree:0
- name: Export `CI_CACHE_ID` from container
run: echo "CI_CACHE_ID=$(cat /.ci_cache_id)" >> $GITHUB_ENV
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pre-commit
key: "${{ env.CI_CACHE_ID }}|\
${{ hashFiles('.pre-commit-config.yaml') }}"
restore-keys: |
${{ env.CI_CACHE_ID }}|
- name: Build cache
shell: bash
run: |
pre-commit gc
echo "Installing hook environments"
time pre-commit install-hooks
- name: Run `pre-commit`
run: |
git config --global --add safe.directory $(pwd)
pre-commit run --all-files --color always --verbose
pre-commit run --color always --hook-stage manual commitlint-ci
pre-commit run --color always --hook-stage manual --verbose commitlint-ci
results:
name: Release / Collect results
permissions:
Expand All @@ -54,7 +65,8 @@ jobs:
# yamllint disable-line rule:line-length
- uses: poseidon/wait-for-status-checks@899c768d191b56eef585c18f8558da19e1f3e707 # v0.6.0
with:
ignore: Release / Collect results
ignore: >
Release / Collect results
ignore_pattern: ^GitLab CI
token: ${{ secrets.GITHUB_TOKEN }}
- run: echo "::notice ::Workflow success!"
82 changes: 41 additions & 41 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
stage_test: &stage_test 'test'
# `image`
# yamllint disable rule:line-length
image_commitlint: &image_commitlint 'techneg/ci-commitlint:v1.1.91@sha256:02574d0409adafb76d5a40a7d08202073e5377f4a7c4bfe9e198d1203ff94a8c'
image_dindruby: &image_dindruby 'techneg/ci-docker-python-ruby:v2.2.60@sha256:de98b8d1d3cf86639fe69bfc4f0416115d18300759c5ed2948ac56f973dd944f'
image_dindrubybionic: &image_dindrubybionic 'techneg/ci-docker-python-ruby:v2.2.60@sha256:de98b8d1d3cf86639fe69bfc4f0416115d18300759c5ed2948ac56f973dd944f'
image_precommit: &image_precommit 'techneg/ci-pre-commit:v2.4.25@sha256:ff5192e893c1079fbf70e3ce6bfc3773815041786a75659793158be930ba7803'
image_commitlint: &image_commitlint 'techneg/ci-commitlint:v1.1.94@sha256:3913ba70632c591b1accf8f65324008cfcbfb231e03a34908dd92022b3cd9fe4'
image_dindruby: &image_dindruby 'techneg/ci-docker-python-ruby:v2.2.63@sha256:d2dd81049d7c0c8e369c744d57824685ae089403c53b1c767d9cfe1c691d9327'
image_dindrubybionic: &image_dindrubybionic 'techneg/ci-docker-python-ruby:v2.2.63@sha256:d2dd81049d7c0c8e369c744d57824685ae089403c53b1c767d9cfe1c691d9327'
image_precommit: &image_precommit 'techneg/ci-pre-commit:v2.4.28@sha256:3a5b362f2fdf60e3a6c614a919c67cc8ae5d34208e287d293fc30c150a919ac6'
image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest@sha256:fe69f9642c7edde46bbd78326d2c42c6e13fc73694efb142e92e206725479328'
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14@sha256:374f588420087517a3cc0235e11293bffd72d7a59da3d98d5e69f014ff2a7761'
# `services`
services_docker_dind: &services_docker_dind
- 'docker:28.2.2-dind@sha256:d4668861cabc1691635d98e827a81cfa834a416f8fe0f4efc609f9f806d86d82'
- 'docker:28.3.0-dind@sha256:d33eb93fe02683e984e6f8a93c0b3d85bb74f56ec83922bc39fb34ba23ab42bc'
# yamllint enable rule:line-length
# `variables`
# https://forum.gitlab.com/t/gitlab-com-ci-caching-rubygems/5627/3
Expand Down Expand Up @@ -184,42 +184,42 @@ rockylinux-8-master: {extends: '.test_instance_failure_permitted'}
ubuntu-2404-master: {extends: '.test_instance_failure_permitted'}
ubuntu-2204-master: {extends: '.test_instance_failure_permitted'}
ubuntu-2004-master: {extends: '.test_instance_failure_permitted'}
almalinux-9-3007-3: {extends: '.test_instance'}
almalinux-8-3007-3: {extends: '.test_instance'}
amazonlinux-2023-3007-3: {extends: '.test_instance'}
amazonlinux-2-3007-3: {extends: '.test_instance_failure_permitted'}
centos-stream9-3007-3: {extends: '.test_instance'}
debian-12-3007-3: {extends: '.test_instance'}
debian-11-3007-3: {extends: '.test_instance'}
fedora-41-3007-3: {extends: '.test_instance_failure_permitted'}
fedora-40-3007-3: {extends: '.test_instance'}
opensuse-leap-156-3007-3: {extends: '.test_instance'}
opensuse-tmbl-latest-3007-3: {extends: '.test_instance'}
oraclelinux-9-3007-3: {extends: '.test_instance'}
oraclelinux-8-3007-3: {extends: '.test_instance'}
rockylinux-9-3007-3: {extends: '.test_instance'}
rockylinux-8-3007-3: {extends: '.test_instance'}
ubuntu-2404-3007-3: {extends: '.test_instance'}
ubuntu-2204-3007-3: {extends: '.test_instance'}
ubuntu-2004-3007-3: {extends: '.test_instance'}
almalinux-9-3006-11: {extends: '.test_instance'}
almalinux-8-3006-11: {extends: '.test_instance'}
amazonlinux-2023-3006-11: {extends: '.test_instance'}
amazonlinux-2-3006-11: {extends: '.test_instance_failure_permitted'}
centos-stream9-3006-11: {extends: '.test_instance'}
debian-12-3006-11: {extends: '.test_instance'}
debian-11-3006-11: {extends: '.test_instance'}
fedora-41-3006-11: {extends: '.test_instance_failure_permitted'}
fedora-40-3006-11: {extends: '.test_instance'}
opensuse-leap-156-3006-11: {extends: '.test_instance'}
opensuse-tmbl-latest-3006-11: {extends: '.test_instance'}
oraclelinux-9-3006-11: {extends: '.test_instance'}
oraclelinux-8-3006-11: {extends: '.test_instance'}
rockylinux-9-3006-11: {extends: '.test_instance'}
rockylinux-8-3006-11: {extends: '.test_instance'}
ubuntu-2404-3006-11: {extends: '.test_instance'}
ubuntu-2204-3006-11: {extends: '.test_instance'}
ubuntu-2004-3006-11: {extends: '.test_instance'}
almalinux-9-3007-5: {extends: '.test_instance'}
almalinux-8-3007-5: {extends: '.test_instance'}
amazonlinux-2023-3007-5: {extends: '.test_instance'}
amazonlinux-2-3007-5: {extends: '.test_instance_failure_permitted'}
centos-stream9-3007-5: {extends: '.test_instance'}
debian-12-3007-5: {extends: '.test_instance'}
debian-11-3007-5: {extends: '.test_instance'}
fedora-41-3007-5: {extends: '.test_instance_failure_permitted'}
fedora-40-3007-5: {extends: '.test_instance'}
opensuse-leap-156-3007-5: {extends: '.test_instance'}
opensuse-tmbl-latest-3007-5: {extends: '.test_instance'}
oraclelinux-9-3007-5: {extends: '.test_instance'}
oraclelinux-8-3007-5: {extends: '.test_instance'}
rockylinux-9-3007-5: {extends: '.test_instance'}
rockylinux-8-3007-5: {extends: '.test_instance'}
ubuntu-2404-3007-5: {extends: '.test_instance'}
ubuntu-2204-3007-5: {extends: '.test_instance'}
ubuntu-2004-3007-5: {extends: '.test_instance'}
almalinux-9-3006-13: {extends: '.test_instance'}
almalinux-8-3006-13: {extends: '.test_instance'}
amazonlinux-2023-3006-13: {extends: '.test_instance'}
amazonlinux-2-3006-13: {extends: '.test_instance_failure_permitted'}
centos-stream9-3006-13: {extends: '.test_instance'}
debian-12-3006-13: {extends: '.test_instance'}
debian-11-3006-13: {extends: '.test_instance'}
fedora-41-3006-13: {extends: '.test_instance_failure_permitted'}
fedora-40-3006-13: {extends: '.test_instance'}
opensuse-leap-156-3006-13: {extends: '.test_instance'}
opensuse-tmbl-latest-3006-13: {extends: '.test_instance'}
oraclelinux-9-3006-13: {extends: '.test_instance'}
oraclelinux-8-3006-13: {extends: '.test_instance'}
rockylinux-9-3006-13: {extends: '.test_instance'}
rockylinux-8-3006-13: {extends: '.test_instance'}
ubuntu-2404-3006-13: {extends: '.test_instance'}
ubuntu-2204-3006-13: {extends: '.test_instance'}
ubuntu-2004-3006-13: {extends: '.test_instance'}
# yamllint enable rule:line-length

###############################################################################
Expand Down
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
- id: commitlint
- id: commitlint-ci
- repo: https://github.com/rubocop-hq/rubocop
rev: v1.76.1
rev: v1.77.0
hooks:
- id: rubocop
name: Check Ruby files with rubocop
Expand Down Expand Up @@ -100,16 +100,21 @@ repos:
)$
additional_dependencies: [pygments==2.16.1]
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 40.48.11
rev: 40.62.1
hooks:
- id: renovate-config-validator
name: Check Renovate config with renovate-config-validator
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.33.0
rev: 0.33.1
hooks:
- id: check-github-workflows
name: Check GitHub workflows with check-jsonschema
args: [--verbose]
- id: check-gitlab-ci
name: Check GitLab CI config with check-jsonschema
args: [--verbose]
- repo: https://github.com/standard/standard
rev: v17.1.2
hooks:
- id: standard
name: Check JavaScript files using standardJS
3 changes: 3 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
extends: 'default'

rules:
comments:
min-spaces-from-content: 1
empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
line-length:
# Increase from default of `80`
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
max: 88
allow-non-breakable-inline-mappings: true
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ gem 'inspec', git: 'https://gitlab.com/saltstack-formulas/infrastructure/inspec'
gem 'kitchen-docker', git: 'https://gitlab.com/saltstack-formulas/infrastructure/kitchen-docker', branch: 'ssf'
# rubocop:enable Layout/LineLength

gem 'kitchen-inspec', '2.6.2'
gem 'kitchen-inspec', '3.0.0'
gem 'kitchen-salt', '0.7.2'

# Avoid the error 'pkeys are immutable on OpenSSL 3.0'
gem 'net-ssh', '>= 7.0.0'

gem 'test-kitchen', '3.6.0'
gem 'test-kitchen', '3.7.0'
25 changes: 20 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ GEM
ms_rest_azure (~> 0.12.0)
base64 (0.2.0)
bcrypt_pbkdf (1.1.1)
bcrypt_pbkdf (1.1.1-x64-mingw-ucrt)
benchmark (0.4.0)
bigdecimal (3.1.9)
bson (4.15.0)
Expand Down Expand Up @@ -410,6 +411,9 @@ GEM
faraday_middleware (1.0.0)
faraday (~> 1.0)
ffi (1.16.3)
ffi (1.16.3-x64-mingw-ucrt)
ffi-win32-extensions (1.0.4)
ffi
fuzzyurl (0.9.0)
google-apis-admin_directory_v1 (0.46.0)
google-apis-core (>= 0.11.0, < 2.a)
Expand Down Expand Up @@ -459,9 +463,9 @@ GEM
json (2.12.0)
jwt (2.10.1)
base64
kitchen-inspec (2.6.2)
kitchen-inspec (3.0.0)
hashie (>= 3.4, <= 5.0)
inspec (>= 2.2.64, < 6.0)
inspec (>= 2.2.64, < 7.0)
test-kitchen (>= 2.7, < 4)
kitchen-salt (0.7.2)
hashie (>= 3.5)
Expand Down Expand Up @@ -492,6 +496,11 @@ GEM
ffi (>= 1.15.5)
mixlib-shellout (3.3.9)
chef-utils
mixlib-shellout (3.3.9-x64-mingw-ucrt)
chef-utils
ffi-win32-extensions (~> 1.0.3)
win32-process (~> 0.9)
wmi-lite (~> 1.0)
mixlib-versioning (1.2.12)
mongo (2.13.2)
bson (>= 4.8.2, < 5.0.0)
Expand All @@ -515,6 +524,8 @@ GEM
nokogiri (1.18.8)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.18.8-x64-mingw-ucrt)
racc (~> 1.4)
nori (2.7.0)
bigdecimal
options (2.3.2)
Expand Down Expand Up @@ -606,7 +617,7 @@ GEM
unicode-display_width (>= 1.5, < 3.0)
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
test-kitchen (3.6.0)
test-kitchen (3.7.0)
bcrypt_pbkdf (~> 1.0)
chef-utils (>= 16.4.35)
ed25519 (~> 1.2)
Expand Down Expand Up @@ -759,6 +770,8 @@ GEM
uber (0.1.0)
unicode-display_width (2.6.0)
unicode_utils (1.4.0)
win32-process (0.10.0)
ffi (>= 1.0.0)
winrm (2.3.8)
builder (>= 2.1.2)
erubi (~> 1.8)
Expand All @@ -779,17 +792,19 @@ GEM
rubyzip (~> 2.0)
winrm (~> 2.0)
wisper (2.0.1)
wmi-lite (1.0.7)

PLATFORMS
ruby
x64-mingw-ucrt

DEPENDENCIES
inspec!
kitchen-docker!
kitchen-inspec (= 2.6.2)
kitchen-inspec (= 3.0.0)
kitchen-salt (= 0.7.2)
net-ssh (>= 7.0.0)
test-kitchen (= 3.6.0)
test-kitchen (= 3.7.0)

BUNDLED WITH
2.3.7
26 changes: 13 additions & 13 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-max-line-length': [2, 'always', 120],
'footer-max-line-length': [2, 'always', 120],
'header-max-length': [2, 'always', 72],
},
ignores: [
(commit) => commit.startsWith("chore(copier):"),
(commit) => commit.startsWith("chore(deps):"),
(commit) => commit.startsWith("ci(pre-commit.ci):"),
(commit) => commit.startsWith("[CI merge]")
],
};
extends: ['@commitlint/config-conventional'],
rules: {
'body-max-line-length': [2, 'always', 120],
'footer-max-line-length': [2, 'always', 120],
'header-max-length': [2, 'always', 72]
},
ignores: [
(commit) => commit.startsWith('chore(copier):'),
(commit) => commit.startsWith('chore(deps):'),
(commit) => commit.startsWith('ci(pre-commit.ci):'),
(commit) => commit.startsWith('[CI merge]')
]
}
Loading
Loading