Skip to content

Commit 7667173

Browse files
authored
Merge pull request #135 from dafyddj/ci/copier
chore: apply template `copier-ssf-ci`at v1.1.9
2 parents db4f960 + e7d24fc commit 7667173

File tree

9 files changed

+529
-375
lines changed

9 files changed

+529
-375
lines changed

.copier-answers.ssf-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: v1.1.9
3+
_src_path: https://github.com/dafyddj/copier-ssf-ci
4+
formula_name: postfix

.github/renovate.json5

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
enabledManagers: [
4+
'copier',
5+
'git-submodules',
6+
],
7+
extends: [
8+
'config:recommended',
9+
'github>saltstack-formulas/.github',
10+
],
11+
automergeStrategy: 'merge-commit',
12+
'git-submodules': {
13+
'enabled': true
14+
},
15+
packageRules: [
16+
{
17+
matchFileNames: [
18+
'template/**'
19+
],
20+
semanticCommitType: 'fix',
21+
},
22+
{
23+
automerge: true,
24+
matchManagers: [
25+
'git-submodules'
26+
],
27+
},
28+
],
29+
}

.github/settings.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
3+
4+
repository:
5+
# See https://docs.github.com/en/rest/reference/repos#update-a-repository
6+
# for all available settings
7+
8+
allow_squash_merge: false

.gitlab-ci.yml

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
stage_release: &stage_release 'release'
1414
stage_test: &stage_test 'test'
1515
# `image`
16-
image_commitlint: &image_commitlint 'techneg/ci-commitlint:v1.1.76'
17-
image_dindruby: &image_dindruby 'techneg/ci-docker-python-ruby:v2.2.45'
18-
image_dindrubybionic: &image_dindrubybionic 'techneg/ci-docker-python-ruby:v2.2.45'
19-
image_precommit: &image_precommit 'techneg/ci-pre-commit:v2.4.10'
20-
image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest'
21-
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14'
16+
# yamllint disable rule:line-length
17+
image_commitlint: &image_commitlint 'techneg/ci-commitlint:v1.1.87@sha256:7d88b7ea69f3cd917995d0e7ea5ce7aae97383db95003319d0c43a1d68372402'
18+
image_dindruby: &image_dindruby 'techneg/ci-docker-python-ruby:v2.2.56@sha256:ff9bbcb82cc2b4ce5c322e45a5afe2a952cf2a418e13aa4b57bf5609f854a0d4'
19+
image_dindrubybionic: &image_dindrubybionic 'techneg/ci-docker-python-ruby:v2.2.56@sha256:ff9bbcb82cc2b4ce5c322e45a5afe2a952cf2a418e13aa4b57bf5609f854a0d4'
20+
image_precommit: &image_precommit 'techneg/ci-pre-commit:v2.4.21@sha256:620cdfaa9c45b4941090e2b557f5f551fbc1189caf13689e5bbfbd5c76885400'
21+
image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest@sha256:fe69f9642c7edde46bbd78326d2c42c6e13fc73694efb142e92e206725479328'
22+
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14@sha256:374f588420087517a3cc0235e11293bffd72d7a59da3d98d5e69f014ff2a7761'
2223
# `services`
2324
services_docker_dind: &services_docker_dind
24-
- 'docker:dind'
25+
- 'docker:dind@sha256:3a861ec98623bd6014610291123751dc19e0c6d474ac3b38767771791ac0eb5e'
26+
# yamllint enable rule:line-length
2527
# `variables`
2628
# https://forum.gitlab.com/t/gitlab-com-ci-caching-rubygems/5627/3
2729
# https://bundler.io/v1.16/bundle_config.html
@@ -130,27 +132,42 @@ rubocop:
130132
# Make sure the instances listed below match up with
131133
# the `platforms` defined in `kitchen.yml`
132134
# yamllint disable rule:line-length
135+
# Fedora 41+ will permit failure until this PR is merged into kitchen-docker
136+
# https://github.com/test-kitchen/kitchen-docker/pull/427 is merged
137+
# OpenSUSE master branch will fail until zypperpkg module is back in salt core
138+
# https://github.com/saltstack/great-module-migration/issues/14
133139
#
134140
# The alias states were removed in the great module migration, causing the tests to fail with Salt master branch
135141
# See https://github.com/saltstack-formulas/postfix-formula/issues/134
136-
default-debian-12-master-py3: {extends: '.test_instance_failure_permitted'}
137-
default-debian-11-master-py3: {extends: '.test_instance_failure_permitted'}
138-
default-ubuntu-2404-master-py3: {extends: '.test_instance_failure_permitted'}
139-
default-ubuntu-2204-master-py3: {extends: '.test_instance_failure_permitted'}
140-
default-opensuse-leap-155-master-py3: {extends: '.test_instance_failure_permitted'}
141-
default-fedora-40-master-py3: {extends: '.test_instance_failure_permitted'}
142-
default-debian-12-3007-1-py3: {extends: '.test_instance'}
143-
default-debian-11-3007-1-py3: {extends: '.test_instance'}
144-
default-ubuntu-2404-3007-1-py3: {extends: '.test_instance'}
145-
default-ubuntu-2204-3007-1-py3: {extends: '.test_instance'}
146-
default-opensuse-leap-155-3007-1-py3: {extends: '.test_instance'}
147-
default-fedora-40-3007-1-py3: {extends: '.test_instance'}
148-
default-debian-12-3006-10-py3: {extends: '.test_instance'}
149-
default-debian-11-3006-10-py3: {extends: '.test_instance'}
150-
default-ubuntu-2404-3006-10-py3: {extends: '.test_instance'}
151-
default-ubuntu-2204-3006-10-py3: {extends: '.test_instance'}
152-
default-opensuse-leap-155-3006-10-py3: {extends: '.test_instance'}
153-
default-fedora-40-3006-10-py3: {extends: '.test_instance'}
142+
debian-12-master-py3: {extends: '.test_instance_failure_permitted'}
143+
debian-11-master-py3: {extends: '.test_instance_failure_permitted'}
144+
ubuntu-2404-master-py3: {extends: '.test_instance_failure_permitted'}
145+
ubuntu-2204-master-py3: {extends: '.test_instance_failure_permitted'}
146+
ubuntu-2004-master-py3: {extends: '.test_instance_failure_permitted'}
147+
centos-stream9-master-py3: {extends: '.test_instance_failure_permitted'}
148+
opensuse-leap-156-master-py3: {extends: '.test_instance_failure_permitted'}
149+
opensuse-leap-155-master-py3: {extends: '.test_instance_failure_permitted'}
150+
fedora-41-master-py3: {extends: '.test_instance_failure_permitted'}
151+
fedora-40-master-py3: {extends: '.test_instance_failure_permitted'}
152+
debian-12-3007-1-py3: {extends: '.test_instance'}
153+
debian-11-3007-1-py3: {extends: '.test_instance'}
154+
ubuntu-2404-3007-1-py3: {extends: '.test_instance'}
155+
ubuntu-2204-3007-1-py3: {extends: '.test_instance'}
156+
ubuntu-2004-3007-1-py3: {extends: '.test_instance'}
157+
centos-stream9-3007-1-py3: {extends: '.test_instance'}
158+
opensuse-leap-156-3007-1-py3: {extends: '.test_instance'}
159+
opensuse-leap-155-3007-1-py3: {extends: '.test_instance'}
160+
fedora-41-3007-1-py3: {extends: '.test_instance_failure_permitted'}
161+
fedora-40-3007-1-py3: {extends: '.test_instance'}
162+
debian-12-3006-10-py3: {extends: '.test_instance'}
163+
debian-11-3006-10-py3: {extends: '.test_instance'}
164+
ubuntu-2404-3006-10-py3: {extends: '.test_instance'}
165+
ubuntu-2204-3006-10-py3: {extends: '.test_instance'}
166+
ubuntu-2004-3006-10-py3: {extends: '.test_instance'}
167+
opensuse-leap-156-3006-10-py3: {extends: '.test_instance'}
168+
opensuse-leap-155-3006-10-py3: {extends: '.test_instance'}
169+
fedora-41-3006-10-py3: {extends: '.test_instance_failure_permitted'}
170+
fedora-40-3006-10-py3: {extends: '.test_instance'}
154171
# yamllint enable rule:line-length
155172

156173
###############################################################################

.pre-commit-config.yaml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ci:
1515
autoupdate_schedule: quarterly
1616
skip: []
1717
submodules: false
18-
default_stages: [commit]
18+
default_stages: [pre-commit]
1919
repos:
2020
- repo: https://github.com/dafyddj/commitlint-pre-commit-hook
2121
rev: v2.3.0
@@ -26,7 +26,7 @@ repos:
2626
stages: [commit-msg]
2727
additional_dependencies: ['@commitlint/[email protected]']
2828
- repo: https://github.com/rubocop-hq/rubocop
29-
rev: v1.57.0
29+
rev: v1.75.5
3030
hooks:
3131
- id: rubocop
3232
name: Check Ruby files with rubocop
@@ -39,7 +39,7 @@ repos:
3939
files: ^.*\.(sh|bash|ksh)$
4040
types: []
4141
- repo: https://github.com/adrienverge/yamllint
42-
rev: v1.32.0
42+
rev: v1.37.1
4343
hooks:
4444
- id: yamllint
4545
name: Check YAML syntax with yamllint
@@ -53,6 +53,7 @@ repos:
5353
# 1. SLS files under directory `test/` which are state files
5454
# 2. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
5555
# 3. YAML files heavily reliant on Jinja
56+
# 4. `.copier-answers.yml` and its variants which are auto-generated
5657
files: |
5758
(?x)^(
5859
.*\.yaml|
@@ -64,6 +65,7 @@ repos:
6465
)$
6566
exclude: |
6667
(?x)^(
68+
\.copier-answers(\..+)?\.ya?ml|
6769
kitchen.vagrant.yml|
6870
test/.*/states/.*\.sls
6971
)$
@@ -73,15 +75,15 @@ repos:
7375
- id: salt-lint
7476
name: Check Salt files using salt-lint
7577
files: ^.*\.(sls|jinja|j2|tmpl|tst)$
76-
- repo: https://github.com/myint/rstcheck
77-
rev: v6.2.0
78+
- repo: https://github.com/rstcheck/rstcheck
79+
rev: v6.2.4
7880
hooks:
7981
- id: rstcheck
8082
name: Check reST files using rstcheck
8183
exclude: 'docs/CHANGELOG.rst'
8284
additional_dependencies: [sphinx==7.2.6]
8385
- repo: https://github.com/saltstack-formulas/mirrors-rst-lint
84-
rev: v1.3.2
86+
rev: v1.4.0
8587
hooks:
8688
- id: rst-lint
8789
name: Check reST files using rst-lint
@@ -93,3 +95,14 @@ repos:
9395
docs/index.rst|
9496
)$
9597
additional_dependencies: [pygments==2.16.1]
98+
- repo: https://github.com/renovatebot/pre-commit-hooks
99+
rev: 40.10.4
100+
hooks:
101+
- id: renovate-config-validator
102+
name: Check Renovate config with renovate-config-validator
103+
- repo: https://github.com/python-jsonschema/check-jsonschema
104+
rev: 0.33.0
105+
hooks:
106+
- id: check-gitlab-ci
107+
name: Check GitLab CI config with check-jsonschema
108+
args: ["--verbose"]

Gemfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ gem 'inspec', git: 'https://gitlab.com/saltstack-formulas/infrastructure/inspec'
1515
gem 'kitchen-docker', git: 'https://gitlab.com/saltstack-formulas/infrastructure/kitchen-docker', branch: 'ssf'
1616
# rubocop:enable Layout/LineLength
1717

18-
gem 'kitchen-inspec', '>= 2.5.0'
19-
gem 'kitchen-salt', '>= 0.7.2'
18+
gem 'kitchen-inspec', '2.6.2'
19+
gem 'kitchen-salt', '0.7.2'
2020

2121
# Avoid the error 'pkeys are immutable on OpenSSL 3.0'
2222
gem 'net-ssh', '>= 7.0.0'
23+
24+
gem 'test-kitchen', '3.6.0'

0 commit comments

Comments
 (0)