From 8d1a0aef570acf5852f6208e6e2b6f2d879a38fc Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 28 Aug 2019 07:41:11 +0100 Subject: [PATCH 01/13] ci(kitchen+travis): replace EOL pre-salted images * Automated using https://github.com/myii/ssf-formula/pull/16 --- .travis.yml | 18 +++++++++++------- kitchen.yml | 39 +++++++++++++++++++++++++++------------ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9992603..138654b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,26 +19,30 @@ services: # the `platforms` defined in `kitchen.yml` env: matrix: - - INSTANCE: default-debian-9-develop-py3 + - INSTANCE: default-debian-10-develop-py3 # - INSTANCE: default-ubuntu-1804-develop-py3 # - INSTANCE: default-centos-7-develop-py3 - # - INSTANCE: default-fedora-29-develop-py3 + # - INSTANCE: default-fedora-30-develop-py3 # - INSTANCE: default-opensuse-leap-15-develop-py3 + # - INSTANCE: default-amazonlinux-2-develop-py2 # - INSTANCE: default-debian-9-2019-2-py3 - INSTANCE: default-ubuntu-1804-2019-2-py3 - - INSTANCE: default-centos-7-2019-2-py3 - # - INSTANCE: default-fedora-29-2019-2-py3 + # - INSTANCE: default-centos-7-2019-2-py3 + # - INSTANCE: default-fedora-30-2019-2-py3 # - INSTANCE: default-opensuse-leap-15-2019-2-py3 + - INSTANCE: default-amazonlinux-2-2019-2-py2 # - INSTANCE: default-debian-9-2018-3-py2 # - INSTANCE: default-ubuntu-1604-2018-3-py2 # - INSTANCE: default-centos-7-2018-3-py2 - INSTANCE: default-fedora-29-2018-3-py2 - - INSTANCE: default-opensuse-leap-42-2018-3-py2 + - INSTANCE: default-opensuse-leap-15-2018-3-py2 + # - INSTANCE: default-amazonlinux-2-2018-3-py2 # - INSTANCE: default-debian-8-2017-7-py2 # - INSTANCE: default-ubuntu-1604-2017-7-py2 - INSTANCE: default-centos-6-2017-7-py2 - # - INSTANCE: default-fedora-28-2017-7-py2 - # - INSTANCE: default-opensuse-leap-42-2017-7-py2 + # - INSTANCE: default-fedora-29-2017-7-py2 + # - INSTANCE: default-opensuse-leap-15-2017-7-py2 + # - INSTANCE: default-amazonlinux-2-2017-7-py2 script: - bin/kitchen verify ${INSTANCE} diff --git a/kitchen.yml b/kitchen.yml index dfb4314..a2b532e 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -12,9 +12,9 @@ driver: # the `env.matrix` instances defined in `.travis.yml` platforms: ## SALT `develop` - - name: debian-9-develop-py3 + - name: debian-10-develop-py3 driver: - image: netmanagers/salt-develop-py3:debian-9 + image: netmanagers/salt-develop-py3:debian-10 provision_command: - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop @@ -30,9 +30,9 @@ platforms: provision_command: - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop - - name: fedora-29-develop-py3 + - name: fedora-30-develop-py3 driver: - image: netmanagers/salt-develop-py3:fedora-29 + image: netmanagers/salt-develop-py3:fedora-30 provision_command: - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop @@ -43,6 +43,12 @@ platforms: - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop run_command: /usr/lib/systemd/systemd + - name: amazonlinux-2-develop-py2 + driver: + image: netmanagers/salt-develop-py2:amazonlinux-2 + provision_command: + - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com + - sh bootstrap-salt.sh -XdPbfrq -x python2 git develop ## SALT `2019.2` - name: debian-9-2019-2-py3 @@ -54,13 +60,16 @@ platforms: - name: centos-7-2019-2-py3 driver: image: netmanagers/salt-2019.2-py3:centos-7 - - name: fedora-29-2019-2-py3 + - name: fedora-30-2019-2-py3 driver: - image: netmanagers/salt-2019.2-py3:fedora-29 + image: netmanagers/salt-2019.2-py3:fedora-30 - name: opensuse-leap-15-2019-2-py3 driver: image: netmanagers/salt-2019.2-py3:opensuse-leap-15 run_command: /usr/lib/systemd/systemd + - name: amazonlinux-2-2019-2-py2 + driver: + image: netmanagers/salt-2019.2-py2:amazonlinux-2 ## SALT `2018.3` - name: debian-9-2018-3-py2 @@ -75,10 +84,13 @@ platforms: - name: fedora-29-2018-3-py2 driver: image: netmanagers/salt-2018.3-py2:fedora-29 - - name: opensuse-leap-42-2018-3-py2 + - name: opensuse-leap-15-2018-3-py2 driver: - image: netmanagers/salt-2018.3-py2:opensuse-leap-42 + image: netmanagers/salt-2018.3-py2:opensuse-leap-15 run_command: /usr/lib/systemd/systemd + - name: amazonlinux-2-2018-3-py2 + driver: + image: netmanagers/salt-2018.3-py2:amazonlinux-2 ## SALT `2017.7` - name: debian-8-2017-7-py2 @@ -91,13 +103,16 @@ platforms: driver: image: netmanagers/salt-2017.7-py2:centos-6 run_command: /sbin/init - - name: fedora-28-2017-7-py2 + - name: fedora-29-2017-7-py2 driver: - image: netmanagers/salt-2017.7-py2:fedora-28 - - name: opensuse-leap-42-2017-7-py2 + image: netmanagers/salt-2017.7-py2:fedora-29 + - name: opensuse-leap-15-2017-7-py2 driver: - image: netmanagers/salt-2017.7-py2:opensuse-leap-42 + image: netmanagers/salt-2017.7-py2:opensuse-leap-15 run_command: /usr/lib/systemd/systemd + - name: amazonlinux-2-2017-7-py2 + driver: + image: netmanagers/salt-2017.7-py2:amazonlinux-2 provisioner: name: salt_solo From e36e78acf4399bc4e1c686fa9539f9b9ca69d773 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sat, 7 Sep 2019 03:40:28 +0100 Subject: [PATCH 02/13] ci: use `dist: bionic` & apply `opensuse-leap-15` SCP error workaround * Automated using https://github.com/myii/ssf-formula/pull/22 --- .travis.yml | 2 +- kitchen.yml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 138654b..99bef74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # vim: ft=yaml --- +dist: bionic stages: - test - lint @@ -10,7 +11,6 @@ stages: sudo: required cache: bundler language: ruby -dist: xenial services: - docker diff --git a/kitchen.yml b/kitchen.yml index a2b532e..ac6debe 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -43,6 +43,10 @@ platforms: - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop run_command: /usr/lib/systemd/systemd + # Workaround to avoid intermittent failures on `opensuse-leap-15`: + # => SCP did not finish successfully (255): (Net::SCP::Error) + transport: + max_ssh_sessions: 1 - name: amazonlinux-2-develop-py2 driver: image: netmanagers/salt-develop-py2:amazonlinux-2 @@ -67,6 +71,10 @@ platforms: driver: image: netmanagers/salt-2019.2-py3:opensuse-leap-15 run_command: /usr/lib/systemd/systemd + # Workaround to avoid intermittent failures on `opensuse-leap-15`: + # => SCP did not finish successfully (255): (Net::SCP::Error) + transport: + max_ssh_sessions: 1 - name: amazonlinux-2-2019-2-py2 driver: image: netmanagers/salt-2019.2-py2:amazonlinux-2 @@ -88,6 +96,10 @@ platforms: driver: image: netmanagers/salt-2018.3-py2:opensuse-leap-15 run_command: /usr/lib/systemd/systemd + # Workaround to avoid intermittent failures on `opensuse-leap-15`: + # => SCP did not finish successfully (255): (Net::SCP::Error) + transport: + max_ssh_sessions: 1 - name: amazonlinux-2-2018-3-py2 driver: image: netmanagers/salt-2018.3-py2:amazonlinux-2 @@ -110,6 +122,10 @@ platforms: driver: image: netmanagers/salt-2017.7-py2:opensuse-leap-15 run_command: /usr/lib/systemd/systemd + # Workaround to avoid intermittent failures on `opensuse-leap-15`: + # => SCP did not finish successfully (255): (Net::SCP::Error) + transport: + max_ssh_sessions: 1 - name: amazonlinux-2-2017-7-py2 driver: image: netmanagers/salt-2017.7-py2:amazonlinux-2 From ecfe10daee53fa8fe1b8ed98f8218da62a4e620c Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 10 Sep 2019 05:56:31 +0100 Subject: [PATCH 03/13] ci(yamllint): add rule `empty-values` & use new `yaml-files` setting * Automated using https://github.com/myii/ssf-formula/pull/27 --- .travis.yml | 6 +++--- .yamllint | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99bef74..af0ae18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,9 +56,9 @@ jobs: 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 + # Need at least `v1.17.0` for the `yaml-files` setting + - pip install --user yamllint>=1.17.0 + - yamllint -s . # Install and run `commitlint` - npm install @commitlint/config-conventional -D - npm install @commitlint/travis-cli -D diff --git a/.yamllint b/.yamllint index 3a90f57..a8509bc 100644 --- a/.yamllint +++ b/.yamllint @@ -6,10 +6,24 @@ extends: default # Files to ignore completely # 1. All YAML files under directory `node_modules/`, introduced during the Travis run +# 2. Any SLS files under directory `test/`, which are actually state files ignore: | node_modules/ + test/**/states/**/*.sls + +yaml-files: + # Default settings + - '*.yaml' + - '*.yml' + - .yamllint + # SaltStack Formulas additional settings + - '*.example' + - test/**/*.sls rules: + empty-values: + forbid-in-block-mappings: true + forbid-in-flow-mappings: true line-length: # Increase from default of `80` # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) From cbf8691c0fcd584f05b333d52a54d46450a8500d Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 23 Sep 2019 17:02:19 +0100 Subject: [PATCH 04/13] ci(kitchen): change `log_level` to `debug` instead of `info` * Automated using https://github.com/myii/ssf-formula/pull/41 --- kitchen.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitchen.yml b/kitchen.yml index ac6debe..71110ba 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -132,7 +132,7 @@ platforms: provisioner: name: salt_solo - log_level: info + log_level: debug salt_install: none require_chef: false formula: influxdb From c42bc0c737391c2b00f195ea3a2caa03085c2405 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 30 Sep 2019 16:01:23 +0100 Subject: [PATCH 05/13] chore(issues): provide `Bug report` & `Feature request` templates [skip ci] * Automated using https://github.com/myii/ssf-formula/pull/48 --- .github/ISSUE_TEMPLATE/bug_report.md | 54 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 42 ++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..04af2ae --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,54 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '[BUG] ' +labels: 'bug' +assignees: '' + +--- + + + +#### Describe the bug + + + + +#### Setup + + + + +#### Steps to reproduce the bug + + + + + + +#### Expected behaviour + + + + +#### Versions report + + + + +#### Additional context + + + + +--- + +#### Optional: How can this template be improved? + + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..ae0b773 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,42 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '[FEATURE] ' +labels: 'enhancement' +assignees: '' + +--- + + + +#### Is your feature request related to a problem? + + + + +#### Describe the solution you'd like + + + + +#### Describe alternatives you've considered + + + + +#### Additional context + + + + +--- + +#### Optional: How can this template be improved? + + + From c651f741c7e1969a08b255eee3fb4a833720d986 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 1 Oct 2019 16:22:49 +0100 Subject: [PATCH 06/13] ci(platform): add `arch-base-latest` (commented out for now) [skip ci] * Automated using https://github.com/myii/ssf-formula/pull/50 --- .travis.yml | 4 ++++ kitchen.yml | 19 +++++++++++++++++++ test/integration/default/inspec.yml | 1 + 3 files changed, 24 insertions(+) diff --git a/.travis.yml b/.travis.yml index af0ae18..8884a9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,24 +25,28 @@ env: # - INSTANCE: default-fedora-30-develop-py3 # - INSTANCE: default-opensuse-leap-15-develop-py3 # - INSTANCE: default-amazonlinux-2-develop-py2 + # - INSTANCE: default-arch-base-latest-develop-py2 # - INSTANCE: default-debian-9-2019-2-py3 - INSTANCE: default-ubuntu-1804-2019-2-py3 # - INSTANCE: default-centos-7-2019-2-py3 # - INSTANCE: default-fedora-30-2019-2-py3 # - INSTANCE: default-opensuse-leap-15-2019-2-py3 - INSTANCE: default-amazonlinux-2-2019-2-py2 + # - INSTANCE: default-arch-base-latest-2019-2-py2 # - INSTANCE: default-debian-9-2018-3-py2 # - INSTANCE: default-ubuntu-1604-2018-3-py2 # - INSTANCE: default-centos-7-2018-3-py2 - INSTANCE: default-fedora-29-2018-3-py2 - INSTANCE: default-opensuse-leap-15-2018-3-py2 # - INSTANCE: default-amazonlinux-2-2018-3-py2 + # - INSTANCE: default-arch-base-latest-2018-3-py2 # - INSTANCE: default-debian-8-2017-7-py2 # - INSTANCE: default-ubuntu-1604-2017-7-py2 - INSTANCE: default-centos-6-2017-7-py2 # - INSTANCE: default-fedora-29-2017-7-py2 # - INSTANCE: default-opensuse-leap-15-2017-7-py2 # - INSTANCE: default-amazonlinux-2-2017-7-py2 + # - INSTANCE: default-arch-base-latest-2017-7-py2 script: - bin/kitchen verify ${INSTANCE} diff --git a/kitchen.yml b/kitchen.yml index 71110ba..5990d75 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -53,6 +53,13 @@ platforms: provision_command: - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - sh bootstrap-salt.sh -XdPbfrq -x python2 git develop + - name: arch-base-latest-develop-py2 + driver: + image: netmanagers/salt-develop-py2:arch-base-latest + provision_command: + - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com + - sh bootstrap-salt.sh -XdPbfrq -x python2 git develop + run_command: /usr/lib/systemd/systemd ## SALT `2019.2` - name: debian-9-2019-2-py3 @@ -78,6 +85,10 @@ platforms: - name: amazonlinux-2-2019-2-py2 driver: image: netmanagers/salt-2019.2-py2:amazonlinux-2 + - name: arch-base-latest-2019-2-py2 + driver: + image: netmanagers/salt-2019.2-py2:arch-base-latest + run_command: /usr/lib/systemd/systemd ## SALT `2018.3` - name: debian-9-2018-3-py2 @@ -103,6 +114,10 @@ platforms: - name: amazonlinux-2-2018-3-py2 driver: image: netmanagers/salt-2018.3-py2:amazonlinux-2 + - name: arch-base-latest-2018-3-py2 + driver: + image: netmanagers/salt-2018.3-py2:arch-base-latest + run_command: /usr/lib/systemd/systemd ## SALT `2017.7` - name: debian-8-2017-7-py2 @@ -129,6 +144,10 @@ platforms: - name: amazonlinux-2-2017-7-py2 driver: image: netmanagers/salt-2017.7-py2:amazonlinux-2 + - name: arch-base-latest-2017-7-py2 + driver: + image: netmanagers/salt-2017.7-py2:arch-base-latest + run_command: /usr/lib/systemd/systemd provisioner: name: salt_solo diff --git a/test/integration/default/inspec.yml b/test/integration/default/inspec.yml index 240fc1f..9ad2e37 100644 --- a/test/integration/default/inspec.yml +++ b/test/integration/default/inspec.yml @@ -15,3 +15,4 @@ supports: - platform-name: suse - platform-name: freebsd - platform-name: amazon + - platform-name: arch From 6690ed8cf321c153274b7014882a11323eee1284 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 1 Oct 2019 21:36:23 +0100 Subject: [PATCH 07/13] ci(kitchen): use bootstrapped `opensuse` images until `2019.2.2` [skip ci] * Automated using https://github.com/myii/ssf-formula/pull/52 --- kitchen.yml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index 5990d75..061b00b 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -38,11 +38,13 @@ platforms: - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop - name: opensuse-leap-15-develop-py3 driver: - image: netmanagers/salt-develop-py3:opensuse-leap-15 + image: opensuse/leap:15 provision_command: - - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - - sh bootstrap-salt.sh -XdPbfrq -x python3 git develop + - systemctl enable sshd.service run_command: /usr/lib/systemd/systemd + provisioner: + salt_bootstrap_options: -XdPfrq -x python3 git develop + salt_install: bootstrap # Workaround to avoid intermittent failures on `opensuse-leap-15`: # => SCP did not finish successfully (255): (Net::SCP::Error) transport: @@ -76,8 +78,13 @@ platforms: image: netmanagers/salt-2019.2-py3:fedora-30 - name: opensuse-leap-15-2019-2-py3 driver: - image: netmanagers/salt-2019.2-py3:opensuse-leap-15 + image: opensuse/leap:15 + provision_command: + - systemctl enable sshd.service run_command: /usr/lib/systemd/systemd + provisioner: + salt_bootstrap_options: -XdPfrq -x python3 git 2019.2 + salt_install: bootstrap # Workaround to avoid intermittent failures on `opensuse-leap-15`: # => SCP did not finish successfully (255): (Net::SCP::Error) transport: @@ -105,8 +112,13 @@ platforms: image: netmanagers/salt-2018.3-py2:fedora-29 - name: opensuse-leap-15-2018-3-py2 driver: - image: netmanagers/salt-2018.3-py2:opensuse-leap-15 + image: opensuse/leap:15 + provision_command: + - systemctl enable sshd.service run_command: /usr/lib/systemd/systemd + provisioner: + salt_bootstrap_options: -XdPfrq -x python2 git 2018.3 + salt_install: bootstrap # Workaround to avoid intermittent failures on `opensuse-leap-15`: # => SCP did not finish successfully (255): (Net::SCP::Error) transport: @@ -135,8 +147,13 @@ platforms: image: netmanagers/salt-2017.7-py2:fedora-29 - name: opensuse-leap-15-2017-7-py2 driver: - image: netmanagers/salt-2017.7-py2:opensuse-leap-15 + image: opensuse/leap:15 + provision_command: + - systemctl enable sshd.service run_command: /usr/lib/systemd/systemd + provisioner: + salt_bootstrap_options: -XdPfrq -x python2 git 2017.7 + salt_install: bootstrap # Workaround to avoid intermittent failures on `opensuse-leap-15`: # => SCP did not finish successfully (255): (Net::SCP::Error) transport: From a4718ee6a4164fbef42d1eac0b92cfe4cc7ee9a1 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 2 Oct 2019 00:09:33 +0100 Subject: [PATCH 08/13] ci(kitchen): install required packages to bootstrapped `opensuse` [skip ci] * Automated using https://github.com/myii/ssf-formula/pull/53 --- kitchen.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kitchen.yml b/kitchen.yml index 061b00b..e411a53 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -40,6 +40,8 @@ platforms: driver: image: opensuse/leap:15 provision_command: + # yamllint disable-line rule:line-length + - zypper install -y glibc-locale net-tools net-tools-deprecated python-xml python3-pip - systemctl enable sshd.service run_command: /usr/lib/systemd/systemd provisioner: @@ -80,6 +82,8 @@ platforms: driver: image: opensuse/leap:15 provision_command: + # yamllint disable-line rule:line-length + - zypper install -y glibc-locale net-tools net-tools-deprecated python-xml python3-pip - systemctl enable sshd.service run_command: /usr/lib/systemd/systemd provisioner: @@ -114,6 +118,8 @@ platforms: driver: image: opensuse/leap:15 provision_command: + # yamllint disable-line rule:line-length + - zypper install -y glibc-locale net-tools net-tools-deprecated python-xml python2-pip - systemctl enable sshd.service run_command: /usr/lib/systemd/systemd provisioner: @@ -149,6 +155,8 @@ platforms: driver: image: opensuse/leap:15 provision_command: + # yamllint disable-line rule:line-length + - zypper install -y glibc-locale net-tools net-tools-deprecated python-xml python2-pip - systemctl enable sshd.service run_command: /usr/lib/systemd/systemd provisioner: From dacf08301a370819e35e8ec3dd589eb908d397d2 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 7 Oct 2019 15:28:46 +0100 Subject: [PATCH 09/13] chore(issues): update `Bug report` & `Feature request` templates [skip ci] * Automated using https://github.com/myii/ssf-formula/pull/58 --- .github/ISSUE_TEMPLATE/bug_report.md | 32 ++++++++++++++++------- .github/ISSUE_TEMPLATE/feature_request.md | 10 +++---- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 04af2ae..1cc8c26 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -14,41 +14,55 @@ Notes: 3. Please direct questions to the [`#formulas` channel on Slack](https://saltstackcommunity.slack.com/messages/C7LG8SV54/), which is bridged to `#saltstack-formulas` on Freenode. --> -#### Describe the bug - +## Your setup +### Formula commit hash / release tag + + + + +### Versions reports (master & minion) + -#### Setup +### Pillar / config used -#### Steps to reproduce the bug +--- + +## Bug details +### Describe the bug + + + + +### Steps to reproduce the bug -#### Expected behaviour +### Expected behaviour -#### Versions report - +### Attempts to fix the bug + -#### Additional context +### Additional context --- -#### Optional: How can this template be improved? +### Meta: How can this template be improved? diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index ae0b773..be8be36 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -14,29 +14,29 @@ Notes: 3. Please direct questions to the [`#formulas` channel on Slack](https://saltstackcommunity.slack.com/messages/C7LG8SV54/), which is bridged to `#saltstack-formulas` on Freenode. --> -#### Is your feature request related to a problem? +### Is your feature request related to a problem? -#### Describe the solution you'd like +### Describe the solution you'd like -#### Describe alternatives you've considered +### Describe alternatives you've considered -#### Additional context +### Additional context --- -#### Optional: How can this template be improved? +### Meta: How can this template be improved? From 0256d3c174ba1b8df9f5140280e8b7d1ca4a23db Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 7 Oct 2019 19:34:28 +0100 Subject: [PATCH 10/13] chore(yamllint): update ignored paths and add `octal-values` [skip ci] * Automated using https://github.com/myii/ssf-formula/pull/59 --- .yamllint | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.yamllint b/.yamllint index a8509bc..c16f39b 100644 --- a/.yamllint +++ b/.yamllint @@ -7,9 +7,11 @@ extends: default # Files to ignore completely # 1. All YAML files under directory `node_modules/`, introduced during the Travis run # 2. Any SLS files under directory `test/`, which are actually state files +# 3. Any YAML files under directory `.kitchen/`, introduced during local testing ignore: | node_modules/ test/**/states/**/*.sls + .kitchen/ yaml-files: # Default settings @@ -28,3 +30,6 @@ rules: # Increase from default of `80` # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) max: 88 + octal-values: + forbid-implicit-octal: true + forbid-explicit-octal: true From d7b9682737880267246c67ec5ecedb52a6284330 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 9 Oct 2019 05:00:47 +0100 Subject: [PATCH 11/13] fix(map.jinja): fix `salt-lint` errors ```bash Examining influxdb/map.jinja of type state [209] Jinja comment should have spaces before and after: {# comment #} influxdb/map.jinja:4 {## [209] Jinja comment should have spaces before and after: {# comment #} influxdb/map.jinja:18 {## [209] Jinja comment should have spaces before and after: {# comment #} influxdb/map.jinja:34 {## Merge the os_family_map into default settings ##} ``` --- influxdb/map.jinja | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/influxdb/map.jinja b/influxdb/map.jinja index 719528a..32b4bae 100644 --- a/influxdb/map.jinja +++ b/influxdb/map.jinja @@ -1,10 +1,10 @@ {% import_yaml "influxdb/defaults.yaml" as defaults %} {% import_yaml "influxdb/config_defaults.yaml" as config_defaults %} -{## +{#- Setup variable using grains['os_family'] based logic, only add key:values here that differ from whats in defaults.yaml -##} +#} {% set os_family_map = salt['grains.filter_by']({ 'Debian': {}, @@ -15,7 +15,7 @@ that differ from whats in defaults.yaml merge=salt['pillar.get']('influxdb:lookup')) %} -{## +{#- Use configuration defaults appropriate for the version of InfluxDB that is being installed unless the user explicitly requested to not use any default values in which case normal pillar merging behaviour will be used. @@ -23,7 +23,7 @@ which case normal pillar merging behaviour will be used. The formula supports different configuration file formats for each MAJOR.MINOR version of InfluxDB and will provide the configuration that ships with the latest release off that branch. -##} +#} {% if not salt['pillar.get']('influxdb:no_conf_defaults', False) %} {% set influxdb_version = salt['pillar.get']('influxdb:version') %} @@ -31,7 +31,7 @@ latest release off that branch. {% do defaults.influxdb.conf.update(config_defaults.get(major).get(minor)) %} {% endif %} -{## Merge the os_family_map into default settings ##} +{#- Merge the os_family_map into default settings #} {% do defaults.influxdb.update(os_family_map) %} {# Update settings defaults from pillar data #} From 9f4f58824817134e1f11fba55baeaa033c6c263e Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 9 Oct 2019 05:02:18 +0100 Subject: [PATCH 12/13] ci: merge travis matrix, add `salt-lint` & `rubocop` to `lint` job * Semi-automated using https://github.com/myii/ssf-formula/pull/60 --- .rubocop.yml | 10 +++++ .salt-lint | 13 ++++++ .travis.yml | 117 +++++++++++++++++++++++++++++++-------------------- .yamllint | 1 + Gemfile | 7 +-- bin/kitchen | 21 +++++---- 6 files changed, 111 insertions(+), 58 deletions(-) create mode 100644 .rubocop.yml create mode 100644 .salt-lint diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..bdae9aa --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +# General overrides used across formulas in the org +Metrics/LineLength: + # Increase from default of `80` + # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) + Max: 88 + +# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config` diff --git a/.salt-lint b/.salt-lint new file mode 100644 index 0000000..a539954 --- /dev/null +++ b/.salt-lint @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +exclude_paths: [] +skip_list: + # Using `salt-lint` for linting other files as well, such as Jinja macros/templates + - 205 # Use ".sls" as a Salt State file extension + # Skipping `207` and `208` because `210` is sufficient, at least for the time-being + # I.e. Allows 3-digit unquoted codes to still be used, such as `644` and `755` + - 207 # File modes should always be encapsulated in quotation marks + - 208 # File modes should always contain a leading zero +tags: [] +verbosity: 1 diff --git a/.travis.yml b/.travis.yml index 8884a9b..ee1a690 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,64 +1,43 @@ # -*- coding: utf-8 -*- # vim: ft=yaml --- +## Machine config dist: bionic -stages: - - test - - lint - - name: release - if: branch = master AND type != pull_request - sudo: required -cache: bundler -language: ruby - services: - docker -# Make sure the instances listed below match up with -# the `platforms` defined in `kitchen.yml` -env: - matrix: - - INSTANCE: default-debian-10-develop-py3 - # - INSTANCE: default-ubuntu-1804-develop-py3 - # - INSTANCE: default-centos-7-develop-py3 - # - INSTANCE: default-fedora-30-develop-py3 - # - INSTANCE: default-opensuse-leap-15-develop-py3 - # - INSTANCE: default-amazonlinux-2-develop-py2 - # - INSTANCE: default-arch-base-latest-develop-py2 - # - INSTANCE: default-debian-9-2019-2-py3 - - INSTANCE: default-ubuntu-1804-2019-2-py3 - # - INSTANCE: default-centos-7-2019-2-py3 - # - INSTANCE: default-fedora-30-2019-2-py3 - # - INSTANCE: default-opensuse-leap-15-2019-2-py3 - - INSTANCE: default-amazonlinux-2-2019-2-py2 - # - INSTANCE: default-arch-base-latest-2019-2-py2 - # - INSTANCE: default-debian-9-2018-3-py2 - # - INSTANCE: default-ubuntu-1604-2018-3-py2 - # - INSTANCE: default-centos-7-2018-3-py2 - - INSTANCE: default-fedora-29-2018-3-py2 - - INSTANCE: default-opensuse-leap-15-2018-3-py2 - # - INSTANCE: default-amazonlinux-2-2018-3-py2 - # - INSTANCE: default-arch-base-latest-2018-3-py2 - # - INSTANCE: default-debian-8-2017-7-py2 - # - INSTANCE: default-ubuntu-1604-2017-7-py2 - - INSTANCE: default-centos-6-2017-7-py2 - # - INSTANCE: default-fedora-29-2017-7-py2 - # - INSTANCE: default-opensuse-leap-15-2017-7-py2 - # - INSTANCE: default-amazonlinux-2-2017-7-py2 - # - INSTANCE: default-arch-base-latest-2017-7-py2 +## Language and cache config +language: ruby +cache: bundler +## Script to run for the test stage script: - - bin/kitchen verify ${INSTANCE} + - bin/kitchen verify "${INSTANCE}" +## Stages and jobs matrix +stages: + - test + - name: release + if: branch = master AND type != pull_request jobs: + allow_failures: + - env: Lint_rubocop + fast_finish: true include: - # Define the `lint` stage (runs `yamllint` and `commitlint`) - - stage: lint - language: node_js + ## Define the test stage that runs the linters (and testing matrix, if applicable) + + # Run all of the linters in a single job (except `rubocop`) + - language: node_js node_js: lts/* + env: Lint + name: 'Lint: salt-lint, yamllint & commitlint' before_install: skip script: + # Install and run `salt-lint` + - pip install --user salt-lint + - git ls-files | grep '\.sls$\|\.jinja$\|\.j2$\|\.tmpl$' + | xargs -I {} salt-lint {} # Install and run `yamllint` # Need at least `v1.17.0` for the `yaml-files` setting - pip install --user yamllint>=1.17.0 @@ -67,10 +46,56 @@ jobs: - npm install @commitlint/config-conventional -D - npm install @commitlint/travis-cli -D - commitlint-travis - # Define the release stage that runs `semantic-release` + # Run the `rubocop` linter in a separate job that is allowed to fail + # Once these lint errors are fixed, this can be merged into a single job + - language: node_js + node_js: lts/* + env: Lint_rubocop + name: 'Lint: rubocop' + before_install: skip + script: + # Install and run `rubocop` + - gem install rubocop + - rubocop -d + + ## Define the rest of the matrix based on Kitchen testing + # Make sure the instances listed below match up with + # the `platforms` defined in `kitchen.yml` + - env: INSTANCE=default-debian-10-develop-py3 + # - env: INSTANCE=default-ubuntu-1804-develop-py3 + # - env: INSTANCE=default-centos-7-develop-py3 + # - env: INSTANCE=default-fedora-30-develop-py3 + # - env: INSTANCE=default-opensuse-leap-15-develop-py3 + # - env: INSTANCE=default-amazonlinux-2-develop-py2 + # - env: INSTANCE=default-arch-base-latest-develop-py2 + # - env: INSTANCE=default-debian-9-2019-2-py3 + - env: INSTANCE=default-ubuntu-1804-2019-2-py3 + # - env: INSTANCE=default-centos-7-2019-2-py3 + # - env: INSTANCE=default-fedora-30-2019-2-py3 + # - env: INSTANCE=default-opensuse-leap-15-2019-2-py3 + - env: INSTANCE=default-amazonlinux-2-2019-2-py2 + # - env: INSTANCE=default-arch-base-latest-2019-2-py2 + # - env: INSTANCE=default-debian-9-2018-3-py2 + # - env: INSTANCE=default-ubuntu-1604-2018-3-py2 + # - env: INSTANCE=default-centos-7-2018-3-py2 + - env: INSTANCE=default-fedora-29-2018-3-py2 + - env: INSTANCE=default-opensuse-leap-15-2018-3-py2 + # - env: INSTANCE=default-amazonlinux-2-2018-3-py2 + # - env: INSTANCE=default-arch-base-latest-2018-3-py2 + # - env: INSTANCE=default-debian-8-2017-7-py2 + # - env: INSTANCE=default-ubuntu-1604-2017-7-py2 + - env: INSTANCE=default-centos-6-2017-7-py2 + # - env: INSTANCE=default-fedora-29-2017-7-py2 + # - env: INSTANCE=default-opensuse-leap-15-2017-7-py2 + # - env: INSTANCE=default-amazonlinux-2-2017-7-py2 + # - env: INSTANCE=default-arch-base-latest-2017-7-py2 + + ## Define the release stage that runs `semantic-release` - stage: release language: node_js node_js: lts/* + env: Release + name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA' before_install: skip script: # Update `AUTHORS.md` diff --git a/.yamllint b/.yamllint index c16f39b..740beca 100644 --- a/.yamllint +++ b/.yamllint @@ -17,6 +17,7 @@ yaml-files: # Default settings - '*.yaml' - '*.yml' + - .salt-lint - .yamllint # SaltStack Formulas additional settings - '*.example' diff --git a/Gemfile b/Gemfile index 3b36de3..5a232b6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ -source "https://rubygems.org" +# frozen_string_literal: true + +source 'https://rubygems.org' gem 'kitchen-docker', '>= 2.9' -gem 'kitchen-salt', '>= 0.6.0' gem 'kitchen-inspec', '>= 1.1' - +gem 'kitchen-salt', '>= 0.6.0' diff --git a/bin/kitchen b/bin/kitchen index 1cd44f3..dcfdb4c 100755 --- a/bin/kitchen +++ b/bin/kitchen @@ -8,22 +8,25 @@ # this file is here to facilitate running it. # -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', + Pathname.new(__FILE__).realpath) -bundle_binstub = File.expand_path("../bundle", __FILE__) +bundle_binstub = File.expand_path('bundle', __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ load(bundle_binstub) else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + abort( + 'Your `bin/bundle` was not generated by Bundler, '\ + 'so this binstub cannot run. Replace `bin/bundle` by running '\ + '`bundle binstubs bundler --force`, then run this command again.' + ) end end -require "rubygems" -require "bundler/setup" +require 'rubygems' +require 'bundler/setup' -load Gem.bin_path("test-kitchen", "kitchen") +load Gem.bin_path('test-kitchen', 'kitchen') From df02244ab2e2f101ae3d2ea1f12c00592cd728ee Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 10 Oct 2019 01:51:32 +0000 Subject: [PATCH 13/13] chore(release): 0.3.1 [skip ci] ## [0.3.1](https://github.com/saltstack-formulas/influxdb-formula/compare/v0.3.0...v0.3.1) (2019-10-10) ### Bug Fixes * **map.jinja:** fix `salt-lint` errors ([](https://github.com/saltstack-formulas/influxdb-formula/commit/d7b9682)) ### Continuous Integration * **kitchen:** change `log_level` to `debug` instead of `info` ([](https://github.com/saltstack-formulas/influxdb-formula/commit/cbf8691)) * **kitchen:** install required packages to bootstrapped `opensuse` [skip ci] ([](https://github.com/saltstack-formulas/influxdb-formula/commit/a4718ee)) * **kitchen:** use bootstrapped `opensuse` images until `2019.2.2` [skip ci] ([](https://github.com/saltstack-formulas/influxdb-formula/commit/6690ed8)) * **kitchen+travis:** replace EOL pre-salted images ([](https://github.com/saltstack-formulas/influxdb-formula/commit/8d1a0ae)) * **platform:** add `arch-base-latest` (commented out for now) [skip ci] ([](https://github.com/saltstack-formulas/influxdb-formula/commit/c651f74)) * **yamllint:** add rule `empty-values` & use new `yaml-files` setting ([](https://github.com/saltstack-formulas/influxdb-formula/commit/ecfe10d)) * merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/influxdb-formula/commit/9f4f588)) * use `dist: bionic` & apply `opensuse-leap-15` SCP error workaround ([](https://github.com/saltstack-formulas/influxdb-formula/commit/e36e78a)) --- AUTHORS.md | 6 ++++-- CHANGELOG.md | 19 +++++++++++++++++++ docs/AUTHORS.rst | 14 ++++++++++---- docs/CHANGELOG.rst | 22 ++++++++++++++++++++++ 4 files changed, 55 insertions(+), 6 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index ecbec56..aebb31a 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -6,12 +6,14 @@ Avatar|Contributor|Contributions :-:|---|:-: @babilen5|[@babilen5](https://github.com/babilen5)|49 @alfredopalhares|[@alfredopalhares](https://github.com/alfredopalhares)|40 +@n-rodriguez|[@n-rodriguez](https://github.com/n-rodriguez)|17 +@myii|[@myii](https://github.com/myii)|17 @nmadhok|[@nmadhok](https://github.com/nmadhok)|7 +@aboe76|[@aboe76](https://github.com/aboe76)|3 @ruimarinho|[@ruimarinho](https://github.com/ruimarinho)|3 @fixe|[@fixe](https://github.com/fixe)|3 @iggy|[@iggy](https://github.com/iggy)|2 @racingferret|[@racingferret](https://github.com/racingferret)|2 -@myii|[@myii](https://github.com/myii)|2 @gravyboat|[@gravyboat](https://github.com/gravyboat)|1 @gianarb|[@gianarb](https://github.com/gianarb)|1 @qybl|[@qybl](https://github.com/qybl)|1 @@ -21,4 +23,4 @@ Avatar|Contributor|Contributions --- -Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2019-08-25. +Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2019-10-10. diff --git a/CHANGELOG.md b/CHANGELOG.md index 135ce00..c205ac5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [0.3.1](https://github.com/saltstack-formulas/influxdb-formula/compare/v0.3.0...v0.3.1) (2019-10-10) + + +### Bug Fixes + +* **map.jinja:** fix `salt-lint` errors ([](https://github.com/saltstack-formulas/influxdb-formula/commit/d7b9682)) + + +### Continuous Integration + +* **kitchen:** change `log_level` to `debug` instead of `info` ([](https://github.com/saltstack-formulas/influxdb-formula/commit/cbf8691)) +* **kitchen:** install required packages to bootstrapped `opensuse` [skip ci] ([](https://github.com/saltstack-formulas/influxdb-formula/commit/a4718ee)) +* **kitchen:** use bootstrapped `opensuse` images until `2019.2.2` [skip ci] ([](https://github.com/saltstack-formulas/influxdb-formula/commit/6690ed8)) +* **kitchen+travis:** replace EOL pre-salted images ([](https://github.com/saltstack-formulas/influxdb-formula/commit/8d1a0ae)) +* **platform:** add `arch-base-latest` (commented out for now) [skip ci] ([](https://github.com/saltstack-formulas/influxdb-formula/commit/c651f74)) +* **yamllint:** add rule `empty-values` & use new `yaml-files` setting ([](https://github.com/saltstack-formulas/influxdb-formula/commit/ecfe10d)) +* merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/influxdb-formula/commit/9f4f588)) +* use `dist: bionic` & apply `opensuse-leap-15` SCP error workaround ([](https://github.com/saltstack-formulas/influxdb-formula/commit/e36e78a)) + # [0.3.0](https://github.com/saltstack-formulas/influxdb-formula/compare/v0.2.1...v0.3.0) (2019-08-25) diff --git a/docs/AUTHORS.rst b/docs/AUTHORS.rst index 036e006..123228e 100644 --- a/docs/AUTHORS.rst +++ b/docs/AUTHORS.rst @@ -19,9 +19,18 @@ This list is sorted by the number of commits per contributor in *descending* ord * - :raw-html-m2r:`@alfredopalhares` - `@alfredopalhares `_ - 40 + * - :raw-html-m2r:`@n-rodriguez` + - `@n-rodriguez `_ + - 17 + * - :raw-html-m2r:`@myii` + - `@myii `_ + - 17 * - :raw-html-m2r:`@nmadhok` - `@nmadhok `_ - 7 + * - :raw-html-m2r:`@aboe76` + - `@aboe76 `_ + - 3 * - :raw-html-m2r:`@ruimarinho` - `@ruimarinho `_ - 3 @@ -34,9 +43,6 @@ This list is sorted by the number of commits per contributor in *descending* ord * - :raw-html-m2r:`@racingferret` - `@racingferret `_ - 2 - * - :raw-html-m2r:`@myii` - - `@myii `_ - - 2 * - :raw-html-m2r:`@gravyboat` - `@gravyboat `_ - 1 @@ -59,4 +65,4 @@ This list is sorted by the number of commits per contributor in *descending* ord ---- -Auto-generated by a `forked version `_ of `gaocegege/maintainer `_ on 2019-08-25. +Auto-generated by a `forked version `_ of `gaocegege/maintainer `_ on 2019-10-10. diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index 0933c46..9b58211 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -2,6 +2,28 @@ Changelog ========= +`0.3.1 `_ (2019-10-10) +---------------------------------------------------------------------------------------------------------- + +Bug Fixes +^^^^^^^^^ + + +* **map.jinja:** fix ``salt-lint`` errors (\ ` `_\ ) + +Continuous Integration +^^^^^^^^^^^^^^^^^^^^^^ + + +* **kitchen:** change ``log_level`` to ``debug`` instead of ``info`` (\ ` `_\ ) +* **kitchen:** install required packages to bootstrapped ``opensuse`` [skip ci] (\ ` `_\ ) +* **kitchen:** use bootstrapped ``opensuse`` images until ``2019.2.2`` [skip ci] (\ ` `_\ ) +* **kitchen+travis:** replace EOL pre-salted images (\ ` `_\ ) +* **platform:** add ``arch-base-latest`` (commented out for now) [skip ci] (\ ` `_\ ) +* **yamllint:** add rule ``empty-values`` & use new ``yaml-files`` setting (\ ` `_\ ) +* merge travis matrix, add ``salt-lint`` & ``rubocop`` to ``lint`` job (\ ` `_\ ) +* use ``dist: bionic`` & apply ``opensuse-leap-15`` SCP error workaround (\ ` `_\ ) + `0.3.0 `_ (2019-08-25) ----------------------------------------------------------------------------------------------------------