diff --git a/.copier-answers.ssf-ci.yml b/.copier-answers.ssf-ci.yml index cbeee30..167035e 100644 --- a/.copier-answers.ssf-ci.yml +++ b/.copier-answers.ssf-ci.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ee234f..f9e552a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,4 @@ --- -# yamllint disable rule:comments name: Test & release 'on': @@ -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!" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b803e8e..d75438c 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.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 @@ -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}" @@ -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' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dfee234..a3a1b74 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 @@ -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.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 @@ -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 0864486..f13b5cb 100644 --- a/.yamllint +++ b/.yamllint @@ -33,6 +33,8 @@ yaml-files: - test/**/*.sls rules: + comments: + min-spaces-from-content: 1 empty-values: forbid-in-block-mappings: true forbid-in-flow-mappings: true @@ -40,6 +42,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 1016083..fc3c51f 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -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]') + ] +} diff --git a/kitchen.yml b/kitchen.yml index 53b2ecb..6862493 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -89,143 +89,143 @@ platforms: driver: image: saltimages/salt-master-py3:rockylinux-8 - ## SALT `3007.4` - - name: debian-12-3007-4 + ## SALT `3007.7` + - name: debian-12-3007-7 driver: - image: saltimages/salt-3007.4-py3:debian-12 + image: saltimages/salt-3007.7-py3:debian-12 run_command: /lib/systemd/systemd - - name: debian-11-3007-4 + - name: debian-11-3007-7 driver: - image: saltimages/salt-3007.4-py3:debian-11 + image: saltimages/salt-3007.7-py3:debian-11 run_command: /lib/systemd/systemd - - name: ubuntu-2404-3007-4 + - name: ubuntu-2404-3007-7 driver: - image: saltimages/salt-3007.4-py3:ubuntu-24.04 + image: saltimages/salt-3007.7-py3:ubuntu-24.04 run_command: /lib/systemd/systemd - - name: ubuntu-2204-3007-4 + - name: ubuntu-2204-3007-7 driver: - image: saltimages/salt-3007.4-py3:ubuntu-22.04 + image: saltimages/salt-3007.7-py3:ubuntu-22.04 run_command: /lib/systemd/systemd - - name: ubuntu-2004-3007-4 + - name: ubuntu-2004-3007-7 driver: - image: saltimages/salt-3007.4-py3:ubuntu-20.04 + image: saltimages/salt-3007.7-py3:ubuntu-20.04 run_command: /lib/systemd/systemd - - name: centos-stream9-3007-4 + - name: centos-stream9-3007-7 driver: - image: saltimages/salt-3007.4-py3:centos-stream9 - - name: opensuse-leap-156-3007-4 + image: saltimages/salt-3007.7-py3:centos-stream9 + - name: opensuse-leap-156-3007-7 driver: - image: saltimages/salt-3007.4-py3:opensuse-leap-15.6 + image: saltimages/salt-3007.7-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-7 driver: - image: saltimages/salt-3007.4-py3:opensuse-tumbleweed-latest + image: saltimages/salt-3007.7-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-7 driver: - image: saltimages/salt-3007.4-py3:fedora-41 - - name: fedora-40-3007-4 + image: saltimages/salt-3007.7-py3:fedora-41 + - name: fedora-40-3007-7 driver: - image: saltimages/salt-3007.4-py3:fedora-40 - - name: amazonlinux-2023-3007-4 + image: saltimages/salt-3007.7-py3:fedora-40 + - name: amazonlinux-2023-3007-7 driver: - image: saltimages/salt-3007.4-py3:amazonlinux-2023 - - name: amazonlinux-2-3007-4 + image: saltimages/salt-3007.7-py3:amazonlinux-2023 + - name: amazonlinux-2-3007-7 driver: - image: saltimages/salt-3007.4-py3:amazonlinux-2 - - name: oraclelinux-9-3007-4 + image: saltimages/salt-3007.7-py3:amazonlinux-2 + - name: oraclelinux-9-3007-7 driver: - image: saltimages/salt-3007.4-py3:oraclelinux-9 - - name: oraclelinux-8-3007-4 + image: saltimages/salt-3007.7-py3:oraclelinux-9 + - name: oraclelinux-8-3007-7 driver: - image: saltimages/salt-3007.4-py3:oraclelinux-8 - - name: almalinux-9-3007-4 + image: saltimages/salt-3007.7-py3:oraclelinux-8 + - name: almalinux-9-3007-7 driver: - image: saltimages/salt-3007.4-py3:almalinux-9 - - name: almalinux-8-3007-4 + image: saltimages/salt-3007.7-py3:almalinux-9 + - name: almalinux-8-3007-7 driver: - image: saltimages/salt-3007.4-py3:almalinux-8 - - name: rockylinux-9-3007-4 + image: saltimages/salt-3007.7-py3:almalinux-8 + - name: rockylinux-9-3007-7 driver: - image: saltimages/salt-3007.4-py3:rockylinux-9 - - name: rockylinux-8-3007-4 + image: saltimages/salt-3007.7-py3:rockylinux-9 + - name: rockylinux-8-3007-7 driver: - image: saltimages/salt-3007.4-py3:rockylinux-8 + image: saltimages/salt-3007.7-py3:rockylinux-8 - ## SALT `3006.12` - - name: debian-12-3006-12 + ## SALT `3006.15` + - name: debian-12-3006-15 driver: - image: saltimages/salt-3006.12-py3:debian-12 + image: saltimages/salt-3006.15-py3:debian-12 run_command: /lib/systemd/systemd - - name: debian-11-3006-12 + - name: debian-11-3006-15 driver: - image: saltimages/salt-3006.12-py3:debian-11 + image: saltimages/salt-3006.15-py3:debian-11 run_command: /lib/systemd/systemd - - name: ubuntu-2404-3006-12 + - name: ubuntu-2404-3006-15 driver: - image: saltimages/salt-3006.12-py3:ubuntu-24.04 + image: saltimages/salt-3006.15-py3:ubuntu-24.04 run_command: /lib/systemd/systemd - - name: ubuntu-2204-3006-12 + - name: ubuntu-2204-3006-15 driver: - image: saltimages/salt-3006.12-py3:ubuntu-22.04 + image: saltimages/salt-3006.15-py3:ubuntu-22.04 run_command: /lib/systemd/systemd - - name: ubuntu-2004-3006-12 + - name: ubuntu-2004-3006-15 driver: - image: saltimages/salt-3006.12-py3:ubuntu-20.04 + image: saltimages/salt-3006.15-py3:ubuntu-20.04 run_command: /lib/systemd/systemd - - name: centos-stream9-3006-12 + - name: centos-stream9-3006-15 driver: - image: saltimages/salt-3006.12-py3:centos-stream9 - - name: opensuse-tmbl-latest-3006-12 + image: saltimages/salt-3006.15-py3:centos-stream9 + - name: opensuse-tmbl-latest-3006-15 driver: - image: saltimages/salt-3006.12-py3:opensuse-tumbleweed-latest + image: saltimages/salt-3006.15-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-15 driver: - image: saltimages/salt-3006.12-py3:opensuse-leap-15.6 + image: saltimages/salt-3006.15-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-15 driver: - image: saltimages/salt-3006.12-py3:fedora-41 - - name: fedora-40-3006-12 + image: saltimages/salt-3006.15-py3:fedora-41 + - name: fedora-40-3006-15 driver: - image: saltimages/salt-3006.12-py3:fedora-40 - - name: amazonlinux-2023-3006-12 + image: saltimages/salt-3006.15-py3:fedora-40 + - name: amazonlinux-2023-3006-15 driver: - image: saltimages/salt-3006.12-py3:amazonlinux-2023 - - name: amazonlinux-2-3006-12 + image: saltimages/salt-3006.15-py3:amazonlinux-2023 + - name: amazonlinux-2-3006-15 driver: - image: saltimages/salt-3006.12-py3:amazonlinux-2 - - name: oraclelinux-9-3006-12 + image: saltimages/salt-3006.15-py3:amazonlinux-2 + - name: oraclelinux-9-3006-15 driver: - image: saltimages/salt-3006.12-py3:oraclelinux-9 - - name: oraclelinux-8-3006-12 + image: saltimages/salt-3006.15-py3:oraclelinux-9 + - name: oraclelinux-8-3006-15 driver: - image: saltimages/salt-3006.12-py3:oraclelinux-8 - - name: almalinux-9-3006-12 + image: saltimages/salt-3006.15-py3:oraclelinux-8 + - name: almalinux-9-3006-15 driver: - image: saltimages/salt-3006.12-py3:almalinux-9 - - name: almalinux-8-3006-12 + image: saltimages/salt-3006.15-py3:almalinux-9 + - name: almalinux-8-3006-15 driver: - image: saltimages/salt-3006.12-py3:almalinux-8 - - name: rockylinux-9-3006-12 + image: saltimages/salt-3006.15-py3:almalinux-8 + - name: rockylinux-9-3006-15 driver: - image: saltimages/salt-3006.12-py3:rockylinux-9 - - name: rockylinux-8-3006-12 + image: saltimages/salt-3006.15-py3:rockylinux-9 + - name: rockylinux-8-3006-15 driver: - image: saltimages/salt-3006.12-py3:rockylinux-8 + image: saltimages/salt-3006.15-py3:rockylinux-8 ########################################################## # This file is managed as part of a Copier template. # diff --git a/pre-commit_semantic-release.sh b/pre-commit_semantic-release.sh index 80f46e2..4437b90 100755 --- a/pre-commit_semantic-release.sh +++ b/pre-commit_semantic-release.sh @@ -3,20 +3,25 @@ ############################################################################### # (A) Update `FORMULA` with `${nextRelease.version}` ############################################################################### + sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA ############################################################################### -# (B) Use `m2r2` to convert automatically produced `.md` docs to `.rst` +# (B) Update `AUTHORS.md` ############################################################################### -# Install `m2r2` -pip3 install m2r2 +maintainer contributor \ + --ignore-contributors dependabot[bot],renovate[bot],semantic-release-bot + +############################################################################### +# (C) Use `m2r` to convert automatically produced `.md` docs to `.rst` +############################################################################### # Copy and then convert the `.md` docs cp ./*.md docs/ cd docs/ || exit -m2r2 --overwrite ./*.md +m2r --overwrite ./*.md # Change excess `H1` headings to `H2` in converted `CHANGELOG.rst` sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst 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 95c9fed..8d2dc29 100644 --- a/release.config.js +++ b/release.config.js @@ -1,107 +1,26 @@ module.exports = { - branch: 'master', + // TODO: remove this when we no longer process releases on GitLab CI repositoryUrl: 'https://github.com/saltstack-formulas/nginx-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', - writerOpts: { - // Required due to upstream bug preventing all types being displayed. - // 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 = [] - - 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` - // } else if (commit.type === `chore`) { - // commit.type = `Maintenance` - } else if (commit.type === `ci`) { - commit.type = `Continuous Integration` - } else { - return - } - - if (commit.scope === `*`) { - commit.scope = `` - } - - 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 (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})` - }) - } - } - - // 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 commit - }, - }, - }, -}; + preset: 'angular' + } +}