Skip to content

Commit dda5b94

Browse files
authored
Merge pull request #133 from sylvainfaivre/ci
ci: use latest test images
2 parents 4a9932d + c48cf63 commit dda5b94

File tree

9 files changed

+451
-465
lines changed

9 files changed

+451
-465
lines changed

.gitlab-ci.yml

Lines changed: 24 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
stage_release: &stage_release 'release'
1414
stage_test: &stage_test 'test'
1515
# `image`
16-
image_commitlint: &image_commitlint 'myii/ssf-commitlint:11'
17-
image_dindruby: &image_dindruby 'myii/ssf-dind-ruby:2.7.1-r3'
18-
image_precommit: &image_precommit
19-
name: 'myii/ssf-pre-commit:2.9.2'
20-
entrypoint: ['/bin/bash', '-c']
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'
2120
image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest'
2221
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14'
2322
# `services`
@@ -131,69 +130,27 @@ rubocop:
131130
# Make sure the instances listed below match up with
132131
# the `platforms` defined in `kitchen.yml`
133132
# yamllint disable rule:line-length
134-
# default-debian-11-tiamat-py3: {extends: '.test_instance'}
135-
# default-debian-10-tiamat-py3: {extends: '.test_instance'}
136-
# default-debian-9-tiamat-py3: {extends: '.test_instance'}
137-
# default-ubuntu-2204-tiamat-py3: {extends: '.test_instance_failure_permitted'}
138-
# default-ubuntu-2004-tiamat-py3: {extends: '.test_instance'}
139-
# default-ubuntu-1804-tiamat-py3: {extends: '.test_instance'}
140-
# default-centos-stream8-tiamat-py3: {extends: '.test_instance_failure_permitted'}
141-
# default-centos-7-tiamat-py3: {extends: '.test_instance'}
142-
# default-amazonlinux-2-tiamat-py3: {extends: '.test_instance'}
143-
# default-oraclelinux-8-tiamat-py3: {extends: '.test_instance'}
144-
# default-oraclelinux-7-tiamat-py3: {extends: '.test_instance'}
145-
# default-almalinux-8-tiamat-py3: {extends: '.test_instance'}
146-
# default-rockylinux-8-tiamat-py3: {extends: '.test_instance'}
147-
default-debian-11-master-py3: {extends: '.test_instance'}
148-
default-debian-10-master-py3: {extends: '.test_instance'}
149-
default-debian-9-master-py3: {extends: '.test_instance'}
133+
#
134+
# The alias states were removed in the great module migration, causing the tests to fail with Salt master branch
135+
# 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'}
150139
default-ubuntu-2204-master-py3: {extends: '.test_instance_failure_permitted'}
151-
default-ubuntu-2004-master-py3: {extends: '.test_instance'}
152-
default-ubuntu-1804-master-py3: {extends: '.test_instance'}
153-
default-centos-stream8-master-py3: {extends: '.test_instance_failure_permitted'}
154-
default-centos-7-master-py3: {extends: '.test_instance'}
155-
default-fedora-36-master-py3: {extends: '.test_instance_failure_permitted'}
156-
default-fedora-35-master-py3: {extends: '.test_instance'}
157-
default-opensuse-leap-153-master-py3: {extends: '.test_instance'}
158-
default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance_failure_permitted'}
159-
default-amazonlinux-2-master-py3: {extends: '.test_instance'}
160-
default-oraclelinux-8-master-py3: {extends: '.test_instance'}
161-
default-oraclelinux-7-master-py3: {extends: '.test_instance'}
162-
default-arch-base-latest-master-py3: {extends: '.test_instance'}
163-
default-gentoo-stage3-latest-master-py3: {extends: '.test_instance'}
164-
default-gentoo-stage3-systemd-master-py3: {extends: '.test_instance'}
165-
default-almalinux-8-master-py3: {extends: '.test_instance'}
166-
default-rockylinux-8-master-py3: {extends: '.test_instance'}
167-
# default-debian-11-3004-1-py3: {extends: '.test_instance'}
168-
# default-debian-10-3004-1-py3: {extends: '.test_instance'}
169-
# default-debian-9-3004-1-py3: {extends: '.test_instance'}
170-
# default-ubuntu-2204-3004-1-py3: {extends: '.test_instance_failure_permitted'}
171-
# default-ubuntu-2004-3004-1-py3: {extends: '.test_instance'}
172-
# default-ubuntu-1804-3004-1-py3: {extends: '.test_instance'}
173-
# default-centos-stream8-3004-1-py3: {extends: '.test_instance_failure_permitted'}
174-
# default-centos-7-3004-1-py3: {extends: '.test_instance'}
175-
# default-fedora-36-3004-1-py3: {extends: '.test_instance_failure_permitted'}
176-
# default-fedora-35-3004-1-py3: {extends: '.test_instance'}
177-
# default-amazonlinux-2-3004-1-py3: {extends: '.test_instance'}
178-
# default-oraclelinux-8-3004-1-py3: {extends: '.test_instance'}
179-
# default-oraclelinux-7-3004-1-py3: {extends: '.test_instance'}
180-
# default-arch-base-latest-3004-1-py3: {extends: '.test_instance'}
181-
# default-gentoo-stage3-latest-3004-1-py3: {extends: '.test_instance'}
182-
# default-gentoo-stage3-systemd-3004-1-py3: {extends: '.test_instance'}
183-
# default-almalinux-8-3004-1-py3: {extends: '.test_instance'}
184-
# default-rockylinux-8-3004-1-py3: {extends: '.test_instance'}
185-
# default-opensuse-leap-153-3004-0-py3: {extends: '.test_instance'}
186-
# default-opensuse-tmbl-latest-3004-0-py3: {extends: '.test_instance_failure_permitted'}
187-
# default-debian-10-3003-4-py3: {extends: '.test_instance'}
188-
# default-debian-9-3003-4-py3: {extends: '.test_instance'}
189-
# default-ubuntu-2004-3003-4-py3: {extends: '.test_instance'}
190-
# default-ubuntu-1804-3003-4-py3: {extends: '.test_instance'}
191-
# default-centos-stream8-3003-4-py3: {extends: '.test_instance_failure_permitted'}
192-
# default-centos-7-3003-4-py3: {extends: '.test_instance'}
193-
# default-amazonlinux-2-3003-4-py3: {extends: '.test_instance'}
194-
# default-oraclelinux-8-3003-4-py3: {extends: '.test_instance'}
195-
# default-oraclelinux-7-3003-4-py3: {extends: '.test_instance'}
196-
# default-almalinux-8-3003-4-py3: {extends: '.test_instance'}
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'}
197154
# yamllint enable rule:line-length
198155

199156
###############################################################################

.pre-commit-config.yaml

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,46 +24,62 @@ repos:
2424
name: Check commit message using commitlint
2525
description: Lint commit message against @commitlint/config-conventional rules
2626
stages: [commit-msg]
27-
additional_dependencies: ['@commitlint/[email protected]']
28-
- id: commitlint-travis
29-
stages: [manual]
30-
additional_dependencies: ['@commitlint/[email protected]']
31-
always_run: true
27+
additional_dependencies: ['@commitlint/[email protected]']
3228
- repo: https://github.com/rubocop-hq/rubocop
33-
rev: v1.30.1
29+
rev: v1.57.0
3430
hooks:
3531
- id: rubocop
3632
name: Check Ruby files with rubocop
3733
args: [--debug]
38-
always_run: true
39-
pass_filenames: false
4034
- repo: https://github.com/shellcheck-py/shellcheck-py
41-
rev: v0.8.0.4
35+
rev: v0.9.0.6
4236
hooks:
4337
- id: shellcheck
4438
name: Check shell scripts with shellcheck
4539
files: ^.*\.(sh|bash|ksh)$
4640
types: []
4741
- repo: https://github.com/adrienverge/yamllint
48-
rev: v1.26.3
42+
rev: v1.32.0
4943
hooks:
5044
- id: yamllint
5145
name: Check YAML syntax with yamllint
52-
args: [--strict, '.']
53-
always_run: true
54-
pass_filenames: false
46+
args: [--strict]
47+
types: [file]
48+
# Files to include
49+
# 1. Obvious YAML files
50+
# 2. `pillar.example` and similar files
51+
# 3. SLS files under directory `test/` which are pillar files
52+
# Files to exclude
53+
# 1. SLS files under directory `test/` which are state files
54+
# 2. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
55+
# 3. YAML files heavily reliant on Jinja
56+
files: |
57+
(?x)^(
58+
.*\.yaml|
59+
.*\.yml|
60+
\.salt-lint|
61+
\.yamllint|
62+
.*\.example|
63+
test/.*\.sls
64+
)$
65+
exclude: |
66+
(?x)^(
67+
kitchen.vagrant.yml|
68+
test/.*/states/.*\.sls
69+
)$
5570
- repo: https://github.com/warpnet/salt-lint
56-
rev: v0.8.0
71+
rev: v0.9.2
5772
hooks:
5873
- id: salt-lint
5974
name: Check Salt files using salt-lint
6075
files: ^.*\.(sls|jinja|j2|tmpl|tst)$
6176
- repo: https://github.com/myint/rstcheck
62-
rev: 3f929574
77+
rev: v6.2.0
6378
hooks:
6479
- id: rstcheck
6580
name: Check reST files using rstcheck
6681
exclude: 'docs/CHANGELOG.rst'
82+
additional_dependencies: [sphinx==7.2.6]
6783
- repo: https://github.com/saltstack-formulas/mirrors-rst-lint
6884
rev: v1.3.2
6985
hooks:
@@ -73,5 +89,7 @@ repos:
7389
(?x)^(
7490
docs/CHANGELOG.rst|
7591
docs/TOFS_pattern.rst|
92+
docs/CONTRIBUTING_DOCS.rst|
93+
docs/index.rst|
7694
)$
77-
additional_dependencies: [pygments==2.9.0]
95+
additional_dependencies: [pygments==2.16.1]

.rstcheck.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
[rstcheck]
22
report=info
33
ignore_language=rst
4-
ignore_messages=(Duplicate (ex|im)plicit target.*|Hyperlink target ".*" is not referenced\.$)
4+
# salt['config.get']('roles') is misidentified as a Markdown link.
5+
# Ignore for now, but perhaps try to submit a fix upstream in rstcheck
6+
ignore_messages=(Duplicate (ex|im)plicit target.*|Hyperlink target ".*" is not referenced\.$|\(rst\) Link is formatted in Markdown style\.)

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Layout/LineLength:
77
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
88
Max: 88
99
Metrics/BlockLength:
10-
IgnoredMethods:
10+
AllowedMethods:
1111
- control
1212
- describe
1313
# Increase from default of `25`

.yamllint

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,6 @@
44
# Extend the `default` configuration provided by `yamllint`
55
extends: 'default'
66

7-
# Files to ignore completely
8-
# 1. All YAML files under directory `.bundle/`, introduced if gems are installed locally
9-
# 2. All YAML files under directory `.cache/`, introduced during the CI run
10-
# 3. All YAML files under directory `.git/`
11-
# 4. All YAML files under directory `node_modules/`, introduced during the CI run
12-
# 5. Any SLS files under directory `test/`, which are actually state files
13-
# 6. Any YAML files under directory `.kitchen/`, introduced during local testing
14-
# 7. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
15-
ignore: |
16-
.bundle/
17-
.cache/
18-
.git/
19-
node_modules/
20-
test/**/states/**/*.sls
21-
.kitchen/
22-
kitchen.vagrant.yml
23-
24-
yaml-files:
25-
# Default settings
26-
- '*.yaml'
27-
- '*.yml'
28-
- .salt-lint
29-
- .yamllint
30-
# SaltStack Formulas additional settings
31-
- '*.example'
32-
- test/**/*.sls
33-
347
rules:
358
empty-values:
369
forbid-in-block-mappings: true

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ gem 'kitchen-docker', git: 'https://gitlab.com/saltstack-formulas/infrastructure
1717

1818
gem 'kitchen-inspec', '>= 2.5.0'
1919
gem 'kitchen-salt', '>= 0.7.2'
20+
21+
# Avoid the error 'pkeys are immutable on OpenSSL 3.0'
22+
gem 'net-ssh', '>= 7.0.0'

0 commit comments

Comments
 (0)