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
26 changes: 26 additions & 0 deletions .copier-answers.ssf-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v2.5.1
_src_path: https://github.com/dafyddj/copier-ssf-ci
failure_permitted_ignored: []
failure_permitted_patterns:
- ^amazonlinux-
- ^almalinux-
- ^oraclelinux-
- ^rockylinux-
- ^centos-
formula_name: syslog-ng
release_using_gha: false
renovate_extend_presets:
- github>saltstack-formulas/.github
- github>saltstack-formulas/.github:copier
renovate_ignore_presets: []
supported_oses:
- AlmaLinux OS
- Amazon Linux
- CentOS
- Debian
- Fedora Linux
- openSUSE
- Oracle Linux
- Rocky Linux
- Ubuntu
11 changes: 11 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
"github>saltstack-formulas/.github",
"github>saltstack-formulas/.github:copier"
],
/**********************************************************
* This file is managed as part of a Copier template. *
* Please make your own changes below this comment. *
*********************************************************/
}
8 changes: 8 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# These settings are synced to GitHub by https://probot.github.io/apps/settings/

repository:
# See https://docs.github.com/en/rest/reference/repos#update-a-repository
# for all available settings

allow_squash_merge: false
72 changes: 72 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
name: Test & release

'on':
- pull_request
- push

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != format('refs/heads/{0}',
github.event.repository.default_branch) }}

jobs:
should-run:
name: Prep / Should run
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
should-run: ${{ steps.action.outputs.should-run }}
steps:
- id: action
# 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.4.31@sha256:041f7d716f4cde881e547881e6cc771d499ff424d0afb7ec678176ff0b940d0a
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@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: |
pre-commit run --all-files --color always --verbose
pre-commit run --color always --hook-stage manual --verbose commitlint-ci
results:
name: Release / Collect results
permissions:
checks: read
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
# yamllint disable-line rule:line-length
- uses: poseidon/wait-for-status-checks@899c768d191b56eef585c18f8558da19e1f3e707 # v0.6.0
with:
ignore: >
Release / Collect results
ignore_pattern: ^GitLab CI
token: ${{ secrets.GITHUB_TOKEN }}
- run: echo "::notice ::Workflow success!"
88 changes: 64 additions & 24 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.97@sha256:7eaa2170f49cf9a8f2acd11a9fc35d4ec93c514935c6b76f7df8a39f9d2afb45'
image_dindruby: &image_dindruby 'techneg/ci-docker-python-ruby:v2.2.66@sha256:5a915fcebd0c32f54b4effcf1aa58ce03f78fc8e8b95e706183ec57c24c9337c'
image_dindrubybionic: &image_dindrubybionic 'techneg/ci-docker-python-ruby:v2.2.66@sha256:5a915fcebd0c32f54b4effcf1aa58ce03f78fc8e8b95e706183ec57c24c9337c'
image_precommit: &image_precommit 'techneg/ci-pre-commit:v2.4.31@sha256:041f7d716f4cde881e547881e6cc771d499ff424d0afb7ec678176ff0b940d0a'
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.2-dind@sha256:5415fccf3da3aed821efb2258cb7dcf52fb9bb0627b02d45338e887c352c4bce'
# yamllint enable rule:line-length
# `variables`
# https://forum.gitlab.com/t/gitlab-com-ci-caching-rubygems/5627/3
Expand Down Expand Up @@ -161,25 +161,65 @@ rubocop:
# Make sure the instances listed below match up with
# the `platforms` defined in `kitchen.yml`
# yamllint disable rule:line-length
default-debian-12-master: {extends: '.test_instance_failure_permitted'}
default-debian-11-master: {extends: '.test_instance_failure_permitted'}
default-ubuntu-2404-master: {extends: '.test_instance_failure_permitted'}
default-ubuntu-2204-master: {extends: '.test_instance_failure_permitted'}
default-opensuse-leap-156-master: {extends: '.test_instance_failure_permitted'}
default-fedora-40-master: {extends: '.test_instance_failure_permitted'}
default-debian-12-3007-4: {extends: '.test_instance'}
default-debian-11-3007-4: {extends: '.test_instance'}
default-ubuntu-2404-3007-4: {extends: '.test_instance'}
default-ubuntu-2204-3007-4: {extends: '.test_instance'}
default-opensuse-leap-156-3007-4: {extends: '.test_instance'}
default-fedora-40-3007-4: {extends: '.test_instance'}
default-debian-12-3006-12: {extends: '.test_instance'}
default-debian-11-3006-12: {extends: '.test_instance'}
default-ubuntu-2404-3006-12: {extends: '.test_instance'}
default-ubuntu-2204-3006-12: {extends: '.test_instance'}
default-opensuse-leap-156-3006-12: {extends: '.test_instance'}
default-fedora-40-3006-12: {extends: '.test_instance'}

# Fedora 41+ will permit failure until this PR is merged into kitchen-docker
# https://github.com/test-kitchen/kitchen-docker/pull/427 is merged
# OpenSUSE master branch will fail until zypperpkg module is back in salt core
# https://github.com/saltstack/great-module-migration/issues/14
#
almalinux-9-master: {extends: '.test_instance_failure_permitted'}
almalinux-8-master: {extends: '.test_instance_failure_permitted'}
amazonlinux-2023-master: {extends: '.test_instance_failure_permitted'}
amazonlinux-2-master: {extends: '.test_instance_failure_permitted'}
centos-stream9-master: {extends: '.test_instance_failure_permitted'}
debian-12-master: {extends: '.test_instance_failure_permitted'}
debian-11-master: {extends: '.test_instance_failure_permitted'}
fedora-41-master: {extends: '.test_instance_failure_permitted'}
fedora-40-master: {extends: '.test_instance_failure_permitted'}
opensuse-leap-156-master: {extends: '.test_instance_failure_permitted'}
opensuse-tmbl-latest-master: {extends: '.test_instance_failure_permitted'}
oraclelinux-9-master: {extends: '.test_instance_failure_permitted'}
oraclelinux-8-master: {extends: '.test_instance_failure_permitted'}
rockylinux-9-master: {extends: '.test_instance_failure_permitted'}
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-6: {extends: '.test_instance_failure_permitted'}
almalinux-8-3007-6: {extends: '.test_instance_failure_permitted'}
amazonlinux-2023-3007-6: {extends: '.test_instance_failure_permitted'}
amazonlinux-2-3007-6: {extends: '.test_instance_failure_permitted'}
centos-stream9-3007-6: {extends: '.test_instance_failure_permitted'}
debian-12-3007-6: {extends: '.test_instance'}
debian-11-3007-6: {extends: '.test_instance'}
fedora-41-3007-6: {extends: '.test_instance_failure_permitted'}
fedora-40-3007-6: {extends: '.test_instance'}
opensuse-leap-156-3007-6: {extends: '.test_instance'}
opensuse-tmbl-latest-3007-6: {extends: '.test_instance'}
oraclelinux-9-3007-6: {extends: '.test_instance_failure_permitted'}
oraclelinux-8-3007-6: {extends: '.test_instance_failure_permitted'}
rockylinux-9-3007-6: {extends: '.test_instance_failure_permitted'}
rockylinux-8-3007-6: {extends: '.test_instance_failure_permitted'}
ubuntu-2404-3007-6: {extends: '.test_instance'}
ubuntu-2204-3007-6: {extends: '.test_instance'}
ubuntu-2004-3007-6: {extends: '.test_instance'}
almalinux-9-3006-14: {extends: '.test_instance_failure_permitted'}
almalinux-8-3006-14: {extends: '.test_instance_failure_permitted'}
amazonlinux-2023-3006-14: {extends: '.test_instance_failure_permitted'}
amazonlinux-2-3006-14: {extends: '.test_instance_failure_permitted'}
centos-stream9-3006-14: {extends: '.test_instance_failure_permitted'}
debian-12-3006-14: {extends: '.test_instance'}
debian-11-3006-14: {extends: '.test_instance'}
fedora-41-3006-14: {extends: '.test_instance_failure_permitted'}
fedora-40-3006-14: {extends: '.test_instance'}
opensuse-leap-156-3006-14: {extends: '.test_instance'}
opensuse-tmbl-latest-3006-14: {extends: '.test_instance'}
oraclelinux-9-3006-14: {extends: '.test_instance_failure_permitted'}
oraclelinux-8-3006-14: {extends: '.test_instance_failure_permitted'}
rockylinux-9-3006-14: {extends: '.test_instance_failure_permitted'}
rockylinux-8-3006-14: {extends: '.test_instance_failure_permitted'}
ubuntu-2404-3006-14: {extends: '.test_instance'}
ubuntu-2204-3006-14: {extends: '.test_instance'}
ubuntu-2004-3006-14: {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.78.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: 41.42.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.2
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
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
20 changes: 13 additions & 7 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +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],
},
};
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