From 022ea2a0034567c1f8e48c4d489c23e03c371038 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 17 Apr 2020 00:34:21 +0100 Subject: [PATCH] feat(powerdns): add initial platforms and test structure --- .yamllint | 1 + ssf/defaults.yaml | 4 +- ssf/files/tofs_powerdns-formula/.rubocop.yml | 44 ++++++++++++++++++++ ssf/formulas.yaml | 40 +++++++++++------- 4 files changed, 73 insertions(+), 16 deletions(-) create mode 100644 ssf/files/tofs_powerdns-formula/.rubocop.yml diff --git a/.yamllint b/.yamllint index a2cdc7f5..74ac766b 100644 --- a/.yamllint +++ b/.yamllint @@ -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 diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index 8013a71b..b506a927 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -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' diff --git a/ssf/files/tofs_powerdns-formula/.rubocop.yml b/ssf/files/tofs_powerdns-formula/.rubocop.yml new file mode 100644 index 00000000..a4557966 --- /dev/null +++ b/ssf/files/tofs_powerdns-formula/.rubocop.yml @@ -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 %} diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 7ea56f9b..65ed183b 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -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: @@ -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: