diff --git a/.travis.yml b/.travis.yml index 87b7433..9992603 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 test/salt/pillar/influxdb.sls + # 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/docs/README.rst b/docs/README.rst index 114e259..b7cbb8e 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -14,7 +14,7 @@ influxdb-formula :scale: 100% :target: https://github.com/semantic-release/semantic-release -Formula to set up and configure influxdb +Formula to set up and configure influxdb. .. contents:: **Table of Contents** @@ -47,7 +47,7 @@ Available states ``influxdb`` ^^^^^^^^^^^^ -Installs InfluxDB from [provided packages](http://influxdb.com/download/) +Installs InfluxDB from [provided packages](http://influxdb.com/download/). At the moment you **have** to specify the InfluxDB version in the ``influxdb:version`` pillar. @@ -83,12 +83,13 @@ Requirements * Docker .. code-block:: bash + $ gem install bundler $ bundle install $ bin/kitchen test [platform] -Where ``[platform]`` is the platform name defined in ``kitchen.yml``, e.g. ``debian-9-2019-2-py3``. - +Where ``[platform]`` is the platform name defined in ``kitchen.yml``, +e.g. ``debian-9-2019-2-py3``. ``bin/kitchen converge`` ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -114,3 +115,4 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri ^^^^^^^^^^^^^^^^^^^^^ Gives you SSH access to the instance for manual testing. + diff --git a/influxdb/config_defaults.yaml b/influxdb/config_defaults.yaml index 49ee40b..b57ac0d 100644 --- a/influxdb/config_defaults.yaml +++ b/influxdb/config_defaults.yaml @@ -1,3 +1,6 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- '0': '13': admin: diff --git a/influxdb/defaults.yaml b/influxdb/defaults.yaml index 855a1c9..ff6190b 100644 --- a/influxdb/defaults.yaml +++ b/influxdb/defaults.yaml @@ -1,3 +1,6 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- influxdb: config: '/etc/influxdb/influxdb.conf' conf: {} @@ -14,7 +17,7 @@ influxdb: system_group: 'influxdb' system_user: 'influxdb' toml_module: toml - use_wget_on_install: True + use_wget_on_install: true tmpl: config: 'salt://influxdb/files/influxdb.config.jinja' etc_default: 'salt://influxdb/files/influxdb.etc_default' diff --git a/pillar.example b/pillar.example index 532af58..0a2c425 100644 --- a/pillar.example +++ b/pillar.example @@ -1,7 +1,10 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- influxdb: version: 0.12.0 no_conf_defaults: false - use_wget_on_install: True + use_wget_on_install: true logging: directory: '/var/log/influxdb' file: 'influxd.log' diff --git a/test/salt/pillar/influxdb.sls b/test/salt/pillar/influxdb.sls index 3fbb321..dfca0aa 100644 --- a/test/salt/pillar/influxdb.sls +++ b/test/salt/pillar/influxdb.sls @@ -1,8 +1,10 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml --- influxdb: version: 0.12.0 no_conf_defaults: false - use_wget_on_install: True + use_wget_on_install: true logging: directory: '/var/log/influxdb' file: 'influxd.log'