Skip to content

Commit

Permalink
Merge pull request #310 from myii/feat/update-codeowners-and-yamllint…
Browse files Browse the repository at this point in the history
…-for-kitchen-vagrant

feat(kitchen-vagrant): update `CODEOWNERS` and `.yamllint` accordingly
  • Loading branch information
myii authored Apr 5, 2021
2 parents a89e1d9 + 91de65d commit eddc13e
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 14 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ celerybeat-schedule
venv/
ENV/

# visual studio
.vs/

# Spyder project settings
.spyderproject
.spyproject
Expand Down Expand Up @@ -120,3 +123,11 @@ docs/*.md
Dockerfile.*_*
ignore/
tmp/

# `salt-formula` -- Vagrant Specific files
.vagrant
top.sls

# `suricata-formula` -- Platform binaries
*.rpm
*.deb
4 changes: 1 addition & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
stages:
- *stage_lint
- *stage_release
variables:
DOCKER_DRIVER: 'overlay2'

###############################################################################
# `lint` stage: `commitlint` & `pre-commit`
# `lint` stage: `commitlint`, `pre-commit` & `rubocop` (latest, failure allowed)
###############################################################################
commitlint:
stage: *stage_lint
Expand Down
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ repos:
args: [--debug]
always_run: true
pass_filenames: false
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.3
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.7.1.1
hooks:
- id: shellcheck
name: Check shell scripts with shellcheck
files: ^.*\.(sh|bash|ksh)$
types: []
args: []
- repo: https://github.com/adrienverge/yamllint
rev: v1.23.0
hooks:
Expand Down
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Metrics/BlockLength:
- describe
# Increase from default of `25`
Max: 30
Security/YAMLLoad:
Exclude:
- test/integration/**/_mapdata.rb

# General settings across all cops in this formula
AllCops:
Expand Down
6 changes: 3 additions & 3 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ extends: 'default'
# 3. All YAML files under directory `node_modules/`, introduced during the Travis run
# 4. Any SLS files under directory `test/`, which are actually state files
# 5. Any YAML files under directory `.kitchen/`, introduced during local testing
# 6. All Jinja templates under `ssf/files/` (result in `yamllint` syntax errors)
# 6. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
# 7. All Jinja templates under `ssf/files/` (result in `yamllint` syntax errors)
# Not disabling via. `*.yml` since we may end up with non-Jinja YAML files here
ignore: |
.cache/
.git/
node_modules/
test/**/states/**/*.sls
.kitchen/
kitchen.vagrant.yml
ssf/files/default/.cirrus.yml
ssf/files/default/.gitlab-ci.yml
ssf/files/default/.pre-commit-config.yaml
Expand All @@ -27,10 +29,8 @@ ignore: |
ssf/files/default/.yamllint
ssf/files/default/inspec/inspec.yml
ssf/files/default/kitchen.yml
ssf/files/default/kitchen.vagrant.yml
ssf/files/default/kitchen.windows.yml
ssf/files/default/.github/workflows/kitchen.yml
ssf/files/default/.github/workflows/kitchen.vagrant.yml
ssf/files/default/.github/workflows/kitchen.windows.yml
ssf/files/tofs_arvados-formula/.travis.yml
ssf/files/tofs_ssf-formula/.yamllint
Expand Down
7 changes: 5 additions & 2 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ ssf_node_anchors:
- '/Gemfile': '@saltstack-formulas/ssf'
- '/Gemfile.lock': '@saltstack-formulas/ssf'
- '/kitchen.yml': '@saltstack-formulas/ssf'
- '/kitchen.vagrant.yml': '@saltstack-formulas/ssf'
- '/kitchen.windows.yml': '@saltstack-formulas/ssf'
- '/pre-commit_semantic-release.sh': '@saltstack-formulas/ssf'
- '/release-rules.js': '@saltstack-formulas/ssf'
- '/release.config.js': '@saltstack-formulas/ssf'
Expand All @@ -62,8 +64,8 @@ ssf_node_anchors:
# An alternative method could be to use:
# `git describe --abbrev=0 --tags`
# yamllint disable rule:line-length rule:quoted-strings
title: "ci: enable Vagrant-based testing using GitHub Actions"
body: '* Semi-automated using https://github.com/myii/ssf-formula/pull/309'
title: "chore: update '`'CODEOWNERS'`' & '`'.yamllint'`' re: '`'kitchen-vagrant'`' [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/310'
# yamllint enable rule:line-length rule:quoted-strings
github:
owner: 'saltstack-formulas'
Expand Down Expand Up @@ -233,6 +235,7 @@ ssf_node_anchors:
additional_ssf:
- 'test/**/states/**/*.sls'
- '.kitchen/'
- 'kitchen.vagrant.yml'
additional: []
yaml-files:
default:
Expand Down
7 changes: 4 additions & 3 deletions ssf/files/default/.yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ extends: '{{ yamllint.extends }}'
# 3. All YAML files under directory `node_modules/`, introduced during the Travis run
# 4. Any SLS files under directory `test/`, which are actually state files
# 5. Any YAML files under directory `.kitchen/`, introduced during local testing
# 6. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
{%- if semrel_formula == 'ssf' %}
# 6. All Jinja templates under `ssf/files/` (result in `yamllint` syntax errors)
# 7. All Jinja templates under `ssf/files/` (result in `yamllint` syntax errors)
# Not disabling via. `*.yml` since we may end up with non-Jinja YAML files here
{%- elif semrel_formula == 'mysql' %}
# 6. Any YAML files using Jinja (result in `yamllint` syntax errors)
# 7. Any YAML files using Jinja (result in `yamllint` syntax errors)
{%- elif semrel_formula in ['postgres', 'salt'] %}
# 6. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
# 7. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
{%- endif %}
{%- set yl_ignores = {'ignore':
yamllint.ignore.default +
Expand Down
2 changes: 2 additions & 0 deletions ssf/formulas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4444,7 +4444,9 @@ ssf:
- ssf/files/default/.yamllint
- ssf/files/default/inspec/inspec.yml
- ssf/files/default/kitchen.yml
- ssf/files/default/kitchen.windows.yml
- ssf/files/default/.github/workflows/kitchen.yml
- ssf/files/default/.github/workflows/kitchen.windows.yml
- ssf/files/tofs_arvados-formula/.travis.yml
- ssf/files/tofs_ssf-formula/.yamllint
rules:
Expand Down

0 comments on commit eddc13e

Please sign in to comment.