Skip to content

Commit

Permalink
Merge pull request #157 from myii/feat/add-powerdns-formula
Browse files Browse the repository at this point in the history
feat(powerdns): add initial platforms and test structure
  • Loading branch information
myii authored Apr 18, 2020
2 parents 3aa6319 + 022ea2a commit 160d144
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 16 deletions.
1 change: 1 addition & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ignore: |
ssf/files/default/.yamllint
ssf/files/default/kitchen.yml
ssf/files/default/inspec/inspec.yml
ssf/files/tofs_powerdns-formula/.rubocop.yml
ssf/files/tofs_ssf-formula/.travis.yml
ssf/files/tofs_ssf-formula/.yamllint
Expand Down
4 changes: 2 additions & 2 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,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: "feat(semantic-release): implement for this formula (without platforms)"
body: '* Automated using /~https://github.com/myii/ssf-formula/pull/156'
title: "ci(kitchen+travis+inspec): add initial platforms and test structure"
body: '* Automated using /~https://github.com/myii/ssf-formula/pull/157'
# yamllint enable rule:line-length rule:quoted-strings
github:
owner: 'saltstack-formulas'
Expand Down
44 changes: 44 additions & 0 deletions ssf/files/tofs_powerdns-formula/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# General overrides used across formulas in the org
{%- set LLL = 'Layout/LineLength' %}
{{ LLL }}:
{%- set rbcp_LLL = rubocop.Cops.get(LLL) %}
{%- if rbcp_LLL.Max == rbcp_LLL.Bugbear %}
# Increase from default of `{{ rbcp_LLL.Default }}`
# Based on /~https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
{%- endif %}
Max: {{ rbcp_LLL.Max }}
{%- set MBL = 'Metrics/BlockLength' %}
{{ MBL }}:
{%- set rbcp_MBL = rubocop.Cops.get(MBL) %}
ExcludedMethods:
{%- for method in rbcp_MBL.ExcludedMethods %}
- {{ method }}
{%- endfor %}

{%- if rubocop.AllCops %}

# General settings across all cops in this formula
AllCops:
{#- This is purposefully simplistic for the time being,
until (if ever) more advanced configuration is necessary #}
{%- if rubocop.AllCops.Exclude %}
# Files to ignore completely
Exclude:
{%- for path in rubocop.AllCops.Exclude %}
- {{ path }}
{%- endfor %}
{%- endif %}
{%- endif %}

# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`
{%- for cop, config in rubocop.Cops.items() if cop not in [LLL, MBL] %}
{{ cop }}:
{#- This is purposefully simplistic for the time being,
until (if ever) more advanced configuration is necessary #}
{%- for k, v in config.items() %}
{{ k }}: {{ v }}
{%- endfor %}
{%- endfor %}
40 changes: 26 additions & 14 deletions ssf/formulas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1871,24 +1871,35 @@ ssf:
inspec_yml:
summary: >-
Verify that the powerdns formula is setup and configured correctly
inspec_suites_matrix: []
platforms: []
platforms_matrix: []
provisioner:
pillars_from_files:
- .sls: 'test/salt/pillar/default.sls'
state_top:
- '*':
- .yaml_dump
- .config
- .backend-sqlite3
platforms: *platforms_new
platforms_matrix:
# [os , os_ver, salt_ver, py_ver, inspec_suite]
- [debian , 10 , master, 3, default]
# - [centos , 8 , master, 3, default]
# - [ubuntu , 18.04, 3000.1, 3, default]
- [opensuse/leap, 15.1 , 3000.1, 3, default]
# - [amazonlinux , 2 , 3000.1, 3, default]
- [fedora , 31 , 2019.2, 3, default]
# - [arch-base , latest, 2018.3, 2, default]
rubocop:
Cops:
Metrics/BlockLength:
ExcludedMethods:
- control
- describe
yamllint:
ignore:
additional:
- sls.example
semrel_files:
.gitignore: *file__--gitignore
.rubocop.yml: *file__--rubocop--yml
.salt-lint: *file__--salt-lint
.travis.yml: *file__--travis--yml
.yamllint: *file__--yamllint
commitlint.config.js: *file__commitlint--config--js
Gemfile: *file__Gemfile
pre-commit_semantic-release.sh: *file__pre-commit_semantic-release--sh
release-rules.js: *file__release-rules--js
release.config.js: *file__release--config--js
semrel_files: *semrel_files_default
prometheus:
context:
git:
Expand Down Expand Up @@ -2213,6 +2224,7 @@ ssf:
- ssf/files/default/.yamllint
- ssf/files/default/kitchen.yml
- ssf/files/default/inspec/inspec.yml
- ssf/files/tofs_powerdns-formula/.rubocop.yml
- ssf/files/tofs_ssf-formula/.travis.yml
- ssf/files/tofs_ssf-formula/.yamllint
rules:
Expand Down

0 comments on commit 160d144

Please sign in to comment.