Skip to content

Commit

Permalink
Merge branch 'saltstack-formulas:master' into fix_master_job_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
mdschmitt committed Feb 6, 2024
2 parents 7d13324 + 570c44b commit 9c963e3
Show file tree
Hide file tree
Showing 5 changed files with 284 additions and 247 deletions.
6 changes: 2 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
stage_test: &stage_test 'test'
# `image`
image_commitlint: &image_commitlint 'myii/ssf-commitlint:11'
image_dindruby: &image_dindruby 'myii/ssf-dind-ruby:2.7.1-r3'
image_precommit: &image_precommit
name: 'myii/ssf-pre-commit:2.9.2'
entrypoint: ['/bin/bash', '-c']
image_dindruby: &image_dindruby 'dafyddj/ci-dind-python-ruby:2.0.2'
image_precommit: &image_precommit 'dafyddj/ci-pre-commit:2.1.0'
image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest'
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14'
# `services`
Expand Down
49 changes: 35 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,46 +24,67 @@ repos:
name: Check commit message using commitlint
description: Lint commit message against @commitlint/config-conventional rules
stages: [commit-msg]
additional_dependencies: ['@commitlint/[email protected]']
- id: commitlint-travis
stages: [manual]
additional_dependencies: ['@commitlint/[email protected]']
always_run: true
additional_dependencies: ['@commitlint/[email protected]']
- repo: https://github.com/rubocop-hq/rubocop
rev: v1.30.1
rev: v1.57.0
hooks:
- id: rubocop
name: Check Ruby files with rubocop
args: [--debug]
always_run: true
pass_filenames: false
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
rev: v0.9.0.6
hooks:
- id: shellcheck
name: Check shell scripts with shellcheck
files: ^.*\.(sh|bash|ksh)$
types: []
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
rev: v1.32.0
hooks:
- id: yamllint
name: Check YAML syntax with yamllint
args: [--strict, '.']
always_run: true
pass_filenames: false
args: [--strict]
types: [file]
# Files to include
# 1. Obvious YAML files
# 2. `pillar.example` and similar files
# 3. SLS files under directory `test/` which are pillar files
# Files to exclude
# 1. SLS files under directory `test/` which are state files
# 2. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
# 3. YAML files heavily reliant on Jinja
files: |
(?x)^(
.*\.yaml|
.*\.yml|
\.salt-lint|
\.yamllint|
.*\.example|
test/.*\.sls
)$
exclude: |
(?x)^(
kitchen.vagrant.yml|
test/.*/states/.*\.sls|
salt/osfamilymap.yaml|
salt/osmap.yaml|
salt/osfingermap.yaml
)$
- repo: https://github.com/warpnet/salt-lint
rev: v0.8.0
rev: v0.9.2
hooks:
- id: salt-lint
name: Check Salt files using salt-lint
files: ^.*\.(sls|jinja|j2|tmpl|tst)$
- repo: https://github.com/myint/rstcheck
rev: 3f929574
rev: v6.2.0
hooks:
- id: rstcheck
name: Check reST files using rstcheck
exclude: 'docs/CHANGELOG.rst'
additional_dependencies: [sphinx==7.2.6]
- repo: https://github.com/saltstack-formulas/mirrors-rst-lint
rev: v1.3.2
hooks:
Expand All @@ -74,4 +95,4 @@ repos:
docs/CHANGELOG.rst|
docs/TOFS_pattern.rst|
)$
additional_dependencies: [pygments==2.9.0]
additional_dependencies: [pygments==2.16.1]
31 changes: 0 additions & 31 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,6 @@
# Extend the `default` configuration provided by `yamllint`
extends: 'default'

# Files to ignore completely
# 1. All YAML files under directory `.bundle/`, introduced if gems are installed locally
# 2. All YAML files under directory `.cache/`, introduced during the CI run
# 3. All YAML files under directory `.git/`
# 4. All YAML files under directory `node_modules/`, introduced during the CI run
# 5. Any SLS files under directory `test/`, which are actually state files
# 6. Any YAML files under directory `.kitchen/`, introduced during local testing
# 7. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
# 8. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
ignore: |
.bundle/
.cache/
.git/
node_modules/
test/**/states/**/*.sls
.kitchen/
kitchen.vagrant.yml
salt/osfamilymap.yaml
salt/osmap.yaml
salt/osfingermap.yaml
yaml-files:
# Default settings
- '*.yaml'
- '*.yml'
- .salt-lint
- .yamllint
# SaltStack Formulas additional settings
- '*.example'
- test/**/*.sls

rules:
empty-values:
forbid-in-block-mappings: true
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ gem 'kitchen-docker', git: 'https://gitlab.com/saltstack-formulas/infrastructure
gem 'kitchen-inspec', '>= 2.5.0'
gem 'kitchen-salt', '>= 0.7.2'

# Avoid the error 'pkeys are immutable on OpenSSL 3.0'
gem 'net-ssh', '>= 7.0.0'

group :vagrant do
gem 'kitchen-vagrant'
end
Loading

0 comments on commit 9c963e3

Please sign in to comment.