diff --git a/.travis.yml b/.travis.yml index 1b9c149..8b34608 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ --- stages: - test - - commitlint + - lint - name: release if: branch = master AND type != pull_request @@ -45,16 +45,21 @@ script: jobs: include: - # Define the commitlint stage - - stage: commitlint + # Define the `lint` stage (runs `yamllint` and `commitlint`) + - stage: lint language: node_js node_js: lts/* before_install: skip script: + # Install and run `yamllint` + - pip install --user yamllint + # yamllint disable-line rule:line-length + - yamllint -s . .yamllint pillar.example + # Install and run `commitlint` - npm install @commitlint/config-conventional -D - npm install @commitlint/travis-cli -D - commitlint-travis - # Define the release stage that runs semantic-release + # Define the release stage that runs `semantic-release` - stage: release language: node_js node_js: lts/* diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..3a90f57 --- /dev/null +++ b/.yamllint @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +# Extend the `default` configuration provided by `yamllint` +extends: default + +# Files to ignore completely +# 1. All YAML files under directory `node_modules/`, introduced during the Travis run +ignore: | + node_modules/ + +rules: + line-length: + # Increase from default of `80` + # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) + max: 88 diff --git a/deepsea/defaults.yaml b/deepsea/defaults.yaml index 8cfe34b..f7bae47 100644 --- a/deepsea/defaults.yaml +++ b/deepsea/defaults.yaml @@ -13,8 +13,8 @@ deepsea: - salt-api - tar - gzip - use_upstream_repo: False - use_upstream_source: True + use_upstream_repo: false + use_upstream_source: true repo: comments: - installed by salt @@ -22,11 +22,12 @@ deepsea: name: /tmp/deepsea uri: 'https://github.com/SUSE/DeepSea/archive/' source: None - source_hash: 88faf687a56060bf08da6ec3cf26917351e843efc4de0489139391d7e6985733 #linux amd64 tarball - trim_output: True {# works in 2018.3.2. onwards #} + # linux amd64 tarball + source_hash: 88faf687a56060bf08da6ec3cf26917351e843efc4de0489139391d7e6985733 + trim_output: true # works in 2018.3.2. onwards archive_suffix: tar.gz archive_format: tar - enforce_toplevel: False + enforce_toplevel: false options: '--strip-components=1' kernel: '' @@ -35,7 +36,7 @@ deepsea: environ_file: /etc/default/deepsea.sh environ: export DEV_ENV=False - + service: user: salt group: salt @@ -43,5 +44,5 @@ deepsea: dead: [] linux: - #'Alternatives system' priority: zero disables (default) + # 'Alternatives system' priority: zero disables (default) altpriority: 0 diff --git a/deepsea/osfamilymap.yaml b/deepsea/osfamilymap.yaml index 51db6f2..35b9a42 100644 --- a/deepsea/osfamilymap.yaml +++ b/deepsea/osfamilymap.yaml @@ -23,7 +23,7 @@ Debian: RedHat: service: name: deepsea - enabled: False + enabled: false pkg: deps: # python-boto3 @@ -34,7 +34,7 @@ RedHat: Suse: pkg: - use_upstream_repo: True + use_upstream_repo: true deps: - python3-tox # python3-boto3 @@ -45,10 +45,12 @@ Suse: repo: name: 'Filesystem tools and FUSE-related packages (openSUSE_Leap_$releasever)' humanname: 'Filesystem tools and FUSE-related packages' + # yamllint disable rule:line-length baseurl: 'http://download.opensuse.org/repositories/filesystems/openSUSE_Leap_$releasever/$basearch' gpgkey: 'http://download.opensuse.org/repositories/filesystems/openSUSE_Leap_42.3/repodata/repomd.xml.key' + # yamllint enable rule:line-length gpgcheck: 1 - gpgautoimport: True + gpgautoimport: true service: dead: - apparmor diff --git a/pillar.example b/pillar.example index 8ea3260..008948b 100644 --- a/pillar.example +++ b/pillar.example @@ -4,7 +4,7 @@ deepsea: version: '0.9.22' pkg: - use_upstream_source: True + use_upstream_source: true archive: uri: https://dl.deepsea.com/oss/release @@ -38,12 +38,10 @@ deepsea: # dirs: # files: files_alt # default: default_alt - # source_files: - # deepsea-config-file-file-managed: - # - 'example_alt.tmpl' - # - 'example_alt.tmpl.jinja' + source_files: + deepsea-config-file-file-managed: + - 'alt_environ.sh.jinja' linux: - #'Alternatives system' priority: zero disables (default) + # 'Alternatives system' priority: zero disables (default) altpriority: 1000 - diff --git a/test/integration/default/inspec.yml b/test/integration/default/inspec.yml index 65cd574..5d5f64a 100644 --- a/test/integration/default/inspec.yml +++ b/test/integration/default/inspec.yml @@ -1,3 +1,6 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- name: default title: deepsea formula maintainer: SaltStack Formulas