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.1.0
_commit: v2.8.0
_src_path: https://github.com/dafyddj/copier-ssf-ci
failure_permitted_ignored: []
failure_permitted_patterns: []
formula_name: nginx
release_using_gha: false
renovate_extend_presets:
- github>saltstack-formulas/.github
- github>saltstack-formulas/.github:copier
Expand Down
43 changes: 31 additions & 12 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,46 +19,66 @@ 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)
# yamllint disable-line rule:line-length
container: techneg/ci-pre-commit:v2.4.25@sha256:ff5192e893c1079fbf70e3ce6bfc3773815041786a75659793158be930ba7803
container: techneg/ci-pre-commit:v2.5.5@sha256:9d92b83a64378da3f9363668b0da244d9f12039d86579881d649ddb40ce261f3
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 10
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: | # Needed because of bug #2031 in `actions/checkout`
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
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@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: ~/.cache/pre-commit
key: "${{ env.CI_CACHE_ID }}|\
${{ hashFiles('.pre-commit-config.yaml') }}"
restore-keys: |
${{ env.CI_CACHE_ID }}|
- name: Build cache
run: |
pre-commit gc
echo "Installing hook environments..."
time -f "Hook installation took %E" 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:
contents: write
issues: write
pull-requests: write
checks: read
container: techneg/ci-semantic-release:v1.2.4@sha256:e7cfe36054a56382568c0824d2539a67a956711d7b674093db320815e928ee27
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- run: | # Needed due to bug actions/checkout#2031
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
# 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 }}
- name: Run `semantic-release`
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAINTAINER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
semantic-release --dry-run
- run: echo "::notice ::Workflow success!"
96 changes: 42 additions & 54 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.103@sha256:3a2bf514e461769ed7b8880213e9637186bb7e17e0653b4a6ad3f249e4a60d33'
image_dindruby: &image_dindruby 'techneg/ci-docker-python-ruby:v2.2.72@sha256:20873e73badc9d5ea93e20ef745f64fe957625a755a60c91e3dad600217e2c76'
image_dindrubybionic: &image_dindrubybionic 'techneg/ci-docker-python-ruby:v2.2.72@sha256:20873e73badc9d5ea93e20ef745f64fe957625a755a60c91e3dad600217e2c76'
image_precommit: &image_precommit 'techneg/ci-pre-commit:v2.5.5@sha256:9d92b83a64378da3f9363668b0da244d9f12039d86579881d649ddb40ce261f3'
image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest@sha256:fe69f9642c7edde46bbd78326d2c42c6e13fc73694efb142e92e206725479328'
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14@sha256:374f588420087517a3cc0235e11293bffd72d7a59da3d98d5e69f014ff2a7761'
image_semantic-release: &image_semanticrelease 'techneg/ci-semantic-release:v1.2.4@sha256:e7cfe36054a56382568c0824d2539a67a956711d7b674093db320815e928ee27'
# `services`
services_docker_dind: &services_docker_dind
- 'docker:28.2.2-dind@sha256:d4668861cabc1691635d98e827a81cfa834a416f8fe0f4efc609f9f806d86d82'
- 'docker:28.3.3-dind@sha256:a56b3bdde89315ed2cc0e4906e582b5033d93bf20d9cb9510c2cdd4e7f7690b1'
# yamllint enable rule:line-length
# `variables`
# https://forum.gitlab.com/t/gitlab-com-ci-caching-rubygems/5627/3
Expand Down Expand Up @@ -94,15 +94,6 @@ commitlint:
# Set default commit hashes for `--from` and `--to`
- 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"'
- 'export COMMITLINT_TO="${CI_COMMIT_SHA}"'
# `coqbot` adds a merge commit to test PRs on top of the latest commit in
# the repo; amend this merge commit message to avoid failure
- |
if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \
&& [ "${CI_COMMIT_BRANCH}" != "master" ]; then
git commit --amend -m \
'chore: reword coqbot merge commit message for commitlint'
export COMMITLINT_TO=HEAD
fi
# Run `commitlint`
- 'commitlint --from "${COMMITLINT_FROM}"
--to "${COMMITLINT_TO}"
Expand Down Expand Up @@ -184,55 +175,52 @@ 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-4: {extends: '.test_instance'}
almalinux-8-3007-4: {extends: '.test_instance'}
amazonlinux-2023-3007-4: {extends: '.test_instance'}
amazonlinux-2-3007-4: {extends: '.test_instance_failure_permitted'}
centos-stream9-3007-4: {extends: '.test_instance'}
debian-12-3007-4: {extends: '.test_instance'}
debian-11-3007-4: {extends: '.test_instance'}
fedora-41-3007-4: {extends: '.test_instance_failure_permitted'}
fedora-40-3007-4: {extends: '.test_instance'}
opensuse-leap-156-3007-4: {extends: '.test_instance'}
opensuse-tmbl-latest-3007-4: {extends: '.test_instance'}
oraclelinux-9-3007-4: {extends: '.test_instance'}
oraclelinux-8-3007-4: {extends: '.test_instance'}
rockylinux-9-3007-4: {extends: '.test_instance'}
rockylinux-8-3007-4: {extends: '.test_instance'}
ubuntu-2404-3007-4: {extends: '.test_instance'}
ubuntu-2204-3007-4: {extends: '.test_instance'}
ubuntu-2004-3007-4: {extends: '.test_instance'}
almalinux-9-3006-12: {extends: '.test_instance'}
almalinux-8-3006-12: {extends: '.test_instance'}
amazonlinux-2023-3006-12: {extends: '.test_instance'}
amazonlinux-2-3006-12: {extends: '.test_instance_failure_permitted'}
centos-stream9-3006-12: {extends: '.test_instance'}
debian-12-3006-12: {extends: '.test_instance'}
debian-11-3006-12: {extends: '.test_instance'}
fedora-41-3006-12: {extends: '.test_instance_failure_permitted'}
fedora-40-3006-12: {extends: '.test_instance'}
opensuse-leap-156-3006-12: {extends: '.test_instance'}
opensuse-tmbl-latest-3006-12: {extends: '.test_instance'}
oraclelinux-9-3006-12: {extends: '.test_instance'}
oraclelinux-8-3006-12: {extends: '.test_instance'}
rockylinux-9-3006-12: {extends: '.test_instance'}
rockylinux-8-3006-12: {extends: '.test_instance'}
ubuntu-2404-3006-12: {extends: '.test_instance'}
ubuntu-2204-3006-12: {extends: '.test_instance'}
ubuntu-2004-3006-12: {extends: '.test_instance'}
almalinux-9-3007-7: {extends: '.test_instance'}
almalinux-8-3007-7: {extends: '.test_instance'}
amazonlinux-2023-3007-7: {extends: '.test_instance'}
amazonlinux-2-3007-7: {extends: '.test_instance_failure_permitted'}
centos-stream9-3007-7: {extends: '.test_instance'}
debian-12-3007-7: {extends: '.test_instance'}
debian-11-3007-7: {extends: '.test_instance'}
fedora-41-3007-7: {extends: '.test_instance_failure_permitted'}
fedora-40-3007-7: {extends: '.test_instance'}
opensuse-leap-156-3007-7: {extends: '.test_instance'}
opensuse-tmbl-latest-3007-7: {extends: '.test_instance'}
oraclelinux-9-3007-7: {extends: '.test_instance'}
oraclelinux-8-3007-7: {extends: '.test_instance'}
rockylinux-9-3007-7: {extends: '.test_instance'}
rockylinux-8-3007-7: {extends: '.test_instance'}
ubuntu-2404-3007-7: {extends: '.test_instance'}
ubuntu-2204-3007-7: {extends: '.test_instance'}
ubuntu-2004-3007-7: {extends: '.test_instance'}
almalinux-9-3006-15: {extends: '.test_instance'}
almalinux-8-3006-15: {extends: '.test_instance'}
amazonlinux-2023-3006-15: {extends: '.test_instance'}
amazonlinux-2-3006-15: {extends: '.test_instance_failure_permitted'}
centos-stream9-3006-15: {extends: '.test_instance'}
debian-12-3006-15: {extends: '.test_instance'}
debian-11-3006-15: {extends: '.test_instance'}
fedora-41-3006-15: {extends: '.test_instance_failure_permitted'}
fedora-40-3006-15: {extends: '.test_instance'}
opensuse-leap-156-3006-15: {extends: '.test_instance'}
opensuse-tmbl-latest-3006-15: {extends: '.test_instance'}
oraclelinux-9-3006-15: {extends: '.test_instance'}
oraclelinux-8-3006-15: {extends: '.test_instance'}
rockylinux-9-3006-15: {extends: '.test_instance'}
rockylinux-8-3006-15: {extends: '.test_instance'}
ubuntu-2404-3006-15: {extends: '.test_instance'}
ubuntu-2204-3006-15: {extends: '.test_instance'}
ubuntu-2004-3006-15: {extends: '.test_instance'}
# yamllint enable rule:line-length

###############################################################################
# `release` stage: `semantic-release`
###############################################################################
semantic-release:
only: *only_branch_master_parent_repo
stage: *stage_release
image: *image_semanticrelease
variables:
MAINTAINER_TOKEN: '${GH_TOKEN}'
script:
# Update `AUTHORS.md`
- '${HOME}/go/bin/maintainer contributor'
# Run `semantic-release`
- 'semantic-release'
13 changes: 9 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ci:
default_stages: [pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-merge-conflict
name: Check for Git merge conflicts
Expand All @@ -30,7 +30,7 @@ repos:
- id: commitlint
- id: commitlint-ci
- repo: https://github.com/rubocop-hq/rubocop
rev: v1.76.1
rev: v1.80.1
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: 41.93.2
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.3
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 @@ -33,13 +33,16 @@ yaml-files:
- test/**/*.sls

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
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,10 @@ GEM
net-ssh (7.3.0)
net-ssh-gateway (2.0.0)
net-ssh (>= 4.0.0)
nokogiri (1.18.8)
nokogiri (1.18.9)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.18.8-x64-mingw-ucrt)
nokogiri (1.18.9-x64-mingw-ucrt)
racc (~> 1.4)
nori (2.7.0)
bigdecimal
Expand Down Expand Up @@ -631,7 +631,7 @@ GEM
winrm (~> 2.0)
winrm-elevated (~> 1.0)
winrm-fs (~> 1.1)
thor (1.3.2)
thor (1.4.0)
timeliness (0.3.10)
tomlrb (1.3.0)
trailblazer-option (0.1.2)
Expand Down
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