From 93ceb44e1fffe2a995285f58713203e733a2e42c Mon Sep 17 00:00:00 2001 From: Dafydd Jones Date: Thu, 31 Jul 2025 00:47:24 +0100 Subject: [PATCH] chore: apply template `copier-ssf-ci` at v2.5.1 --- .copier-answers.ssf-ci.yml | 26 ++++++ .github/renovate.json5 | 11 +++ .github/settings.yml | 8 ++ .github/workflows/main.yml | 72 ++++++++++++++++ .gitlab-ci.yml | 88 ++++++++++++++------ .pre-commit-config.yaml | 11 ++- .yamllint | 3 + Gemfile.lock | 6 +- commitlint.config.js | 20 +++-- kitchen.yml | 156 ++++++++++++++++++----------------- release-rules.js | 20 ++--- release.config.js | 165 +++++++++++++++++++------------------ 12 files changed, 381 insertions(+), 205 deletions(-) create mode 100644 .copier-answers.ssf-ci.yml create mode 100644 .github/renovate.json5 create mode 100644 .github/settings.yml create mode 100644 .github/workflows/main.yml diff --git a/.copier-answers.ssf-ci.yml b/.copier-answers.ssf-ci.yml new file mode 100644 index 0000000..10a1d9d --- /dev/null +++ b/.copier-answers.ssf-ci.yml @@ -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 diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000..1fe72da --- /dev/null +++ b/.github/renovate.json5 @@ -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. * + *********************************************************/ +} diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000..ba78eec --- /dev/null +++ b/.github/settings.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c121efb --- /dev/null +++ b/.github/workflows/main.yml @@ -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!" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2cb7993..bf55d15 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 @@ -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 ############################################################################### diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dfee234..52682a1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -100,12 +100,12 @@ 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 @@ -113,3 +113,8 @@ repos: - 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 diff --git a/.yamllint b/.yamllint index b408788..20e95e6 100644 --- a/.yamllint +++ b/.yamllint @@ -5,6 +5,8 @@ extends: 'default' rules: + comments: + min-spaces-from-content: 1 empty-values: forbid-in-block-mappings: true forbid-in-flow-mappings: true @@ -12,6 +14,7 @@ rules: # 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 diff --git a/Gemfile.lock b/Gemfile.lock index 748a026..f5fb7b3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 @@ -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) diff --git a/commitlint.config.js b/commitlint.config.js index 4eb37f4..fc3c51f 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -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]') + ] +} diff --git a/kitchen.yml b/kitchen.yml index 1a57c12..9e69ccf 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -17,6 +17,8 @@ provisioner: salt_copy_filter: - .kitchen - .git + pillars_from_directories: + - test/salt/pillar transport: # Avoid lengthy waits when a container does not launch correctly @@ -89,144 +91,148 @@ platforms: driver: image: saltimages/salt-master-py3:rockylinux-8 - ## SALT `3007.4` - - name: debian-12-3007-4 + ## SALT `3007.6` + - name: debian-12-3007-6 driver: - image: saltimages/salt-3007.4-py3:debian-12 + image: saltimages/salt-3007.6-py3:debian-12 run_command: /lib/systemd/systemd - - name: debian-11-3007-4 + - name: debian-11-3007-6 driver: - image: saltimages/salt-3007.4-py3:debian-11 + image: saltimages/salt-3007.6-py3:debian-11 run_command: /lib/systemd/systemd - - name: ubuntu-2404-3007-4 + - name: ubuntu-2404-3007-6 driver: - image: saltimages/salt-3007.4-py3:ubuntu-24.04 + image: saltimages/salt-3007.6-py3:ubuntu-24.04 run_command: /lib/systemd/systemd - - name: ubuntu-2204-3007-4 + - name: ubuntu-2204-3007-6 driver: - image: saltimages/salt-3007.4-py3:ubuntu-22.04 + image: saltimages/salt-3007.6-py3:ubuntu-22.04 run_command: /lib/systemd/systemd - - name: ubuntu-2004-3007-4 + - name: ubuntu-2004-3007-6 driver: - image: saltimages/salt-3007.4-py3:ubuntu-20.04 + image: saltimages/salt-3007.6-py3:ubuntu-20.04 run_command: /lib/systemd/systemd - - name: centos-stream9-3007-4 + - name: centos-stream9-3007-6 driver: - image: saltimages/salt-3007.4-py3:centos-stream9 - - name: opensuse-leap-156-3007-4 + image: saltimages/salt-3007.6-py3:centos-stream9 + - name: opensuse-leap-156-3007-6 driver: - image: saltimages/salt-3007.4-py3:opensuse-leap-15.6 + image: saltimages/salt-3007.6-py3:opensuse-leap-15.6 # Workaround to avoid intermittent failures on `opensuse-leap-15.6`: # => SCP did not finish successfully (255): (Net::SCP::Error) transport: max_ssh_sessions: 1 - - name: opensuse-tmbl-latest-3007-4 + - name: opensuse-tmbl-latest-3007-6 driver: - image: saltimages/salt-3007.4-py3:opensuse-tumbleweed-latest + image: saltimages/salt-3007.6-py3:opensuse-tumbleweed-latest # Workaround to avoid intermittent failures on `opensuse-tumbleweed`: # => SCP did not finish successfully (255): (Net::SCP::Error) transport: max_ssh_sessions: 1 - - name: fedora-41-3007-4 + - name: fedora-41-3007-6 driver: - image: saltimages/salt-3007.4-py3:fedora-41 - - name: fedora-40-3007-4 + image: saltimages/salt-3007.6-py3:fedora-41 + - name: fedora-40-3007-6 driver: - image: saltimages/salt-3007.4-py3:fedora-40 - - name: amazonlinux-2023-3007-4 + image: saltimages/salt-3007.6-py3:fedora-40 + - name: amazonlinux-2023-3007-6 driver: - image: saltimages/salt-3007.4-py3:amazonlinux-2023 - - name: amazonlinux-2-3007-4 + image: saltimages/salt-3007.6-py3:amazonlinux-2023 + - name: amazonlinux-2-3007-6 driver: - image: saltimages/salt-3007.4-py3:amazonlinux-2 - - name: oraclelinux-9-3007-4 + image: saltimages/salt-3007.6-py3:amazonlinux-2 + - name: oraclelinux-9-3007-6 driver: - image: saltimages/salt-3007.4-py3:oraclelinux-9 - - name: oraclelinux-8-3007-4 + image: saltimages/salt-3007.6-py3:oraclelinux-9 + - name: oraclelinux-8-3007-6 driver: - image: saltimages/salt-3007.4-py3:oraclelinux-8 - - name: almalinux-9-3007-4 + image: saltimages/salt-3007.6-py3:oraclelinux-8 + - name: almalinux-9-3007-6 driver: - image: saltimages/salt-3007.4-py3:almalinux-9 - - name: almalinux-8-3007-4 + image: saltimages/salt-3007.6-py3:almalinux-9 + - name: almalinux-8-3007-6 driver: - image: saltimages/salt-3007.4-py3:almalinux-8 - - name: rockylinux-9-3007-4 + image: saltimages/salt-3007.6-py3:almalinux-8 + - name: rockylinux-9-3007-6 driver: - image: saltimages/salt-3007.4-py3:rockylinux-9 - - name: rockylinux-8-3007-4 + image: saltimages/salt-3007.6-py3:rockylinux-9 + - name: rockylinux-8-3007-6 driver: - image: saltimages/salt-3007.4-py3:rockylinux-8 + image: saltimages/salt-3007.6-py3:rockylinux-8 - ## SALT `3006.12` - - name: debian-12-3006-12 + ## SALT `3006.14` + - name: debian-12-3006-14 driver: - image: saltimages/salt-3006.12-py3:debian-12 + image: saltimages/salt-3006.14-py3:debian-12 run_command: /lib/systemd/systemd - - name: debian-11-3006-12 + - name: debian-11-3006-14 driver: - image: saltimages/salt-3006.12-py3:debian-11 + image: saltimages/salt-3006.14-py3:debian-11 run_command: /lib/systemd/systemd - - name: ubuntu-2404-3006-12 + - name: ubuntu-2404-3006-14 driver: - image: saltimages/salt-3006.12-py3:ubuntu-24.04 + image: saltimages/salt-3006.14-py3:ubuntu-24.04 run_command: /lib/systemd/systemd - - name: ubuntu-2204-3006-12 + - name: ubuntu-2204-3006-14 driver: - image: saltimages/salt-3006.12-py3:ubuntu-22.04 + image: saltimages/salt-3006.14-py3:ubuntu-22.04 run_command: /lib/systemd/systemd - - name: ubuntu-2004-3006-12 + - name: ubuntu-2004-3006-14 driver: - image: saltimages/salt-3006.12-py3:ubuntu-20.04 + image: saltimages/salt-3006.14-py3:ubuntu-20.04 run_command: /lib/systemd/systemd - - name: centos-stream9-3006-12 + - name: centos-stream9-3006-14 driver: - image: saltimages/salt-3006.12-py3:centos-stream9 - - name: opensuse-tmbl-latest-3006-12 + image: saltimages/salt-3006.14-py3:centos-stream9 + - name: opensuse-tmbl-latest-3006-14 driver: - image: saltimages/salt-3006.12-py3:opensuse-tumbleweed-latest + image: saltimages/salt-3006.14-py3:opensuse-tumbleweed-latest # Workaround to avoid intermittent failures on `opensuse-tumbleweed`: # => SCP did not finish successfully (255): (Net::SCP::Error) transport: max_ssh_sessions: 1 - - name: opensuse-leap-156-3006-12 + - name: opensuse-leap-156-3006-14 driver: - image: saltimages/salt-3006.12-py3:opensuse-leap-15.6 + image: saltimages/salt-3006.14-py3:opensuse-leap-15.6 # Workaround to avoid intermittent failures on `opensuse-leap-15.6`: # => SCP did not finish successfully (255): (Net::SCP::Error) transport: max_ssh_sessions: 1 - - name: fedora-41-3006-12 + - name: fedora-41-3006-14 driver: - image: saltimages/salt-3006.12-py3:fedora-41 - - name: fedora-40-3006-12 + image: saltimages/salt-3006.14-py3:fedora-41 + - name: fedora-40-3006-14 driver: - image: saltimages/salt-3006.12-py3:fedora-40 - - name: amazonlinux-2023-3006-12 + image: saltimages/salt-3006.14-py3:fedora-40 + - name: amazonlinux-2023-3006-14 driver: - image: saltimages/salt-3006.12-py3:amazonlinux-2023 - - name: amazonlinux-2-3006-12 + image: saltimages/salt-3006.14-py3:amazonlinux-2023 + - name: amazonlinux-2-3006-14 driver: - image: saltimages/salt-3006.12-py3:amazonlinux-2 - - name: oraclelinux-9-3006-12 + image: saltimages/salt-3006.14-py3:amazonlinux-2 + - name: oraclelinux-9-3006-14 driver: - image: saltimages/salt-3006.12-py3:oraclelinux-9 - - name: oraclelinux-8-3006-12 + image: saltimages/salt-3006.14-py3:oraclelinux-9 + - name: oraclelinux-8-3006-14 driver: - image: saltimages/salt-3006.12-py3:oraclelinux-8 - - name: almalinux-9-3006-12 + image: saltimages/salt-3006.14-py3:oraclelinux-8 + - name: almalinux-9-3006-14 driver: - image: saltimages/salt-3006.12-py3:almalinux-9 - - name: almalinux-8-3006-12 + image: saltimages/salt-3006.14-py3:almalinux-9 + - name: almalinux-8-3006-14 driver: - image: saltimages/salt-3006.12-py3:almalinux-8 - - name: rockylinux-9-3006-12 + image: saltimages/salt-3006.14-py3:almalinux-8 + - name: rockylinux-9-3006-14 driver: - image: saltimages/salt-3006.12-py3:rockylinux-9 - - name: rockylinux-8-3006-12 + image: saltimages/salt-3006.14-py3:rockylinux-9 + - name: rockylinux-8-3006-14 driver: - image: saltimages/salt-3006.12-py3:rockylinux-8 + image: saltimages/salt-3006.14-py3:rockylinux-8 +########################################################## +# This file is managed as part of a Copier template. # +# Please make your own changes below this comment. # +########################################################## verifier: # https://www.inspec.io/ @@ -249,8 +255,6 @@ suites: base: '*': - syslog_ng - pillars_from_files: - syslog_ng.sls: test/salt/pillar/syslog_ng.sls verifier: inspec_tests: - path: test/integration/default diff --git a/release-rules.js b/release-rules.js index c63c850..1093d1f 100644 --- a/release-rules.js +++ b/release-rules.js @@ -3,16 +3,16 @@ // // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`. module.exports = [ - {breaking: true, release: 'major'}, + { breaking: true, release: 'major' }, // {type: 'build', release: 'patch'}, // {type: 'chore', release: 'patch'}, // {type: 'ci', release: 'patch'}, - {type: 'docs', release: 'patch'}, - {type: 'feat', release: 'minor'}, - {type: 'fix', release: 'patch'}, - {type: 'perf', release: 'patch'}, - {type: 'refactor', release: 'patch'}, - {type: 'revert', release: 'patch'}, - {type: 'style', release: 'patch'}, - {type: 'test', release: 'patch'}, -]; + { type: 'docs', release: 'patch' }, + { type: 'feat', release: 'minor' }, + { type: 'fix', release: 'patch' }, + { type: 'perf', release: 'patch' }, + { type: 'refactor', release: 'patch' }, + { type: 'revert', release: 'patch' }, + { type: 'style', release: 'patch' }, + { type: 'test', release: 'patch' } +] diff --git a/release.config.js b/release.config.js index 36b3dcf..7c7f506 100644 --- a/release.config.js +++ b/release.config.js @@ -2,22 +2,23 @@ module.exports = { branch: 'master', repositoryUrl: 'https://github.com/saltstack-formulas/syslog-ng-formula', plugins: [ - ['@semantic-release/commit-analyzer', { - preset: 'angular', - releaseRules: './release-rules.js', - }], - '@semantic-release/release-notes-generator', - ['@semantic-release/changelog', { - changelogFile: 'CHANGELOG.md', - changelogTitle: '# Changelog', - }], - ['@semantic-release/exec', { - prepareCmd: 'sh ./pre-commit_semantic-release.sh ${nextRelease.version}', - }], - ['@semantic-release/git', { - assets: ['*.md', 'docs/*.rst', 'FORMULA'], - }], - '@semantic-release/github', + ['@semantic-release/commit-analyzer', { + preset: 'angular', + releaseRules: './release-rules.js' + }], + '@semantic-release/release-notes-generator', + ['@semantic-release/changelog', { + changelogFile: 'CHANGELOG.md', + changelogTitle: '# Changelog' + }], + ['@semantic-release/exec', { + // eslint-disable-next-line no-template-curly-in-string + prepareCmd: 'sh ./pre-commit_semantic-release.sh ${nextRelease.version}' + }], + ['@semantic-release/git', { + assets: ['*.md', 'docs/*.rst', 'FORMULA'] + }], + '@semantic-release/github' ], generateNotes: { preset: 'angular', @@ -26,82 +27,82 @@ module.exports = { // Bug: https://github.com/conventional-changelog/conventional-changelog/issues/317 // Fix: https://github.com/conventional-changelog/conventional-changelog/pull/410 transform: (commit, context) => { - const issues = [] + const issues = [] - commit.notes.forEach(note => { - note.title = `BREAKING CHANGES` - }) + commit.notes.forEach(note => { + note.title = 'BREAKING CHANGES' + }) - // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`. - if (commit.type === `feat`) { - commit.type = `Features` - } else if (commit.type === `fix`) { - commit.type = `Bug Fixes` - } else if (commit.type === `perf`) { - commit.type = `Performance Improvements` - } else if (commit.type === `revert`) { - commit.type = `Reverts` - } else if (commit.type === `docs`) { - commit.type = `Documentation` - } else if (commit.type === `style`) { - commit.type = `Styles` - } else if (commit.type === `refactor`) { - commit.type = `Code Refactoring` - } else if (commit.type === `test`) { - commit.type = `Tests` - } else if (commit.type === `build`) { - commit.type = `Build System` + // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`. + if (commit.type === 'feat') { + commit.type = 'Features' + } else if (commit.type === 'fix') { + commit.type = 'Bug Fixes' + } else if (commit.type === 'perf') { + commit.type = 'Performance Improvements' + } else if (commit.type === 'revert') { + commit.type = 'Reverts' + } else if (commit.type === 'docs') { + commit.type = 'Documentation' + } else if (commit.type === 'style') { + commit.type = 'Styles' + } else if (commit.type === 'refactor') { + commit.type = 'Code Refactoring' + } else if (commit.type === 'test') { + commit.type = 'Tests' + } else if (commit.type === 'build') { + commit.type = 'Build System' // } else if (commit.type === `chore`) { // commit.type = `Maintenance` - } else if (commit.type === `ci`) { - commit.type = `Continuous Integration` - } else { - return - } + } else if (commit.type === 'ci') { + commit.type = 'Continuous Integration' + } else { + return + } - if (commit.scope === `*`) { - commit.scope = `` - } + if (commit.scope === '*') { + commit.scope = '' + } - if (typeof commit.hash === `string`) { - commit.shortHash = commit.hash.substring(0, 7) - } + if (typeof commit.hash === 'string') { + commit.shortHash = commit.hash.substring(0, 7) + } - if (typeof commit.subject === `string`) { - let url = context.repository - ? `${context.host}/${context.owner}/${context.repository}` - : context.repoUrl - if (url) { - url = `${url}/issues/` - // Issue URLs. - commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => { - issues.push(issue) - return `[#${issue}](${url}${issue})` - }) + if (typeof commit.subject === 'string') { + let url = context.repository + ? `${context.host}/${context.owner}/${context.repository}` + : context.repoUrl + if (url) { + url = `${url}/issues/` + // Issue URLs. + commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => { + issues.push(issue) + return `[#${issue}](${url}${issue})` + }) + } + if (context.host) { + // User URLs. + commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => { + if (username.includes('/')) { + return `@${username}` } - if (context.host) { - // User URLs. - commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => { - if (username.includes('/')) { - return `@${username}` - } - return `[@${username}](${context.host}/${username})` - }) - } + return `[@${username}](${context.host}/${username})` + }) } + } - // remove references that already appear in the subject - commit.references = commit.references.filter(reference => { - if (issues.indexOf(reference.issue) === -1) { - return true - } + // remove references that already appear in the subject + commit.references = commit.references.filter(reference => { + if (issues.indexOf(reference.issue) === -1) { + return true + } - return false - }) + return false + }) - return commit - }, - }, - }, -}; + return commit + } + } + } +}