From 6cba4af4f7ccd9f8c7f6636efb92d0cb51857705 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 4 Sep 2019 19:26:30 +0100 Subject: [PATCH] fix(yamllint): use separate suite for `ubuntu` * Semi-automated using https://github.com/myii/ssf-formula/pull/18 * Close #174 --- .travis.yml | 10 +++++----- kitchen.yml | 32 ++++++++++++++++++++++++++++---- test/salt/pillar/debian.sls | 10 +--------- test/salt/pillar/ubuntu.sls | 12 ++++++++++++ 4 files changed, 46 insertions(+), 18 deletions(-) create mode 100644 test/salt/pillar/ubuntu.sls diff --git a/.travis.yml b/.travis.yml index cb68c07..6a9af09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,22 +20,22 @@ services: env: matrix: - INSTANCE: debian-debian-9-develop-py3 - # - INSTANCE: debian-ubuntu-1804-develop-py3 + # - INSTANCE: ubuntu-ubuntu-1804-develop-py3 # - INSTANCE: redhat-centos-7-develop-py3 # - INSTANCE: redhat-fedora-29-develop-py3 # - INSTANCE: suse-opensuse-leap-15-develop-py3 # - INSTANCE: debian-debian-9-2019-2-py3 - - INSTANCE: debian-ubuntu-1804-2019-2-py3 + - INSTANCE: ubuntu-ubuntu-1804-2019-2-py3 - INSTANCE: redhat-centos-7-2019-2-py3 # - INSTANCE: redhat-fedora-29-2019-2-py3 # - INSTANCE: suse-opensuse-leap-15-2019-2-py3 # - INSTANCE: debian-debian-9-2018-3-py2 - # - INSTANCE: debian-ubuntu-1604-2018-3-py2 + # - INSTANCE: ubuntu-ubuntu-1604-2018-3-py2 # - INSTANCE: redhat-centos-7-2018-3-py2 - INSTANCE: redhat-fedora-29-2018-3-py2 - INSTANCE: suse-opensuse-leap-42-2018-3-py2 # - INSTANCE: debian-debian-8-2017-7-py2 - # - INSTANCE: debian-ubuntu-1604-2017-7-py2 + # - INSTANCE: ubuntu-ubuntu-1604-2017-7-py2 - INSTANCE: redhat-centos-6-2017-7-py2 # - INSTANCE: redhat-fedora-28-2017-7-py2 # - INSTANCE: suse-opensuse-leap-42-2017-7-py2 @@ -54,7 +54,7 @@ jobs: # Install and run `yamllint` - pip install --user yamllint # yamllint disable-line rule:line-length - - yamllint -s . .yamllint pillar.example test/salt/pillar/debian.sls test/salt/pillar/redhat.sls test/salt/pillar/suse.sls + - yamllint -s . .yamllint pillar.example test/salt/pillar/debian.sls test/salt/pillar/ubuntu.sls test/salt/pillar/redhat.sls test/salt/pillar/suse.sls # Install and run `commitlint` - npm install @commitlint/config-conventional -D - npm install @commitlint/travis-cli -D diff --git a/kitchen.yml b/kitchen.yml index ad77345..457532d 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -137,13 +137,9 @@ suites: - name: debian includes: - debian-9-develop-py3 - - ubuntu-1804-develop-py3 - debian-9-2019-2-py3 - - ubuntu-1804-2019-2-py3 - debian-9-2018-3-py2 - - ubuntu-1604-2018-3-py2 - debian-8-2017-7-py2 - - ubuntu-1604-2017-7-py2 provisioner: state_top: base: @@ -164,6 +160,34 @@ suites: verifier: inspec_tests: - path: test/integration/default + - name: ubuntu + includes: + - ubuntu-1804-develop-py3 + - ubuntu-1804-2019-2-py3 + - ubuntu-1604-2018-3-py2 + - ubuntu-1604-2017-7-py2 + provisioner: + state_top: + base: + '*': + - php.repo + - php.fpm.install + - php.fpm.config + - php.fpm.pools + - php.modules + - php.fpm.service + pillars: + top.sls: + base: + '*': + - php + - ubuntu + pillars_from_files: + php.sls: test/salt/pillar/debian.sls + ubuntu.sls: test/salt/pillar/ubuntu.sls + verifier: + inspec_tests: + - path: test/integration/default - name: redhat includes: - centos-7-develop-py3 diff --git a/test/salt/pillar/debian.sls b/test/salt/pillar/debian.sls index 16b23a5..d63e315 100644 --- a/test/salt/pillar/debian.sls +++ b/test/salt/pillar/debian.sls @@ -2,20 +2,12 @@ # vim: ft=yaml --- php: -{% if salt['grains.get']('os') == 'Ubuntu' %} - use_external_repo: true - repo: - humanname: php-sury ppa - name: "deb http://ppa.launchpad.net/ondrej/php/ubuntu {{ salt['grains.get']('oscodename') }} main" - file: /etc/apt/sources.list.d/php-sury.list - key_url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c -{% else %} repo: humanname: php-sury repo + # yamllint disable-line rule:line-length name: "deb https://packages.sury.org/php/ {{ salt['grains.get']('oscodename') }} main" file: /etc/apt/sources.list.d/php-sury.list key_url: https://packages.sury.org/php/apt.gpg -{% endif %} version: - '5.6' diff --git a/test/salt/pillar/ubuntu.sls b/test/salt/pillar/ubuntu.sls new file mode 100644 index 0000000..2f09005 --- /dev/null +++ b/test/salt/pillar/ubuntu.sls @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +php: + use_external_repo: true + repo: + humanname: php-sury ppa + # yamllint disable-line rule:line-length + name: "deb http://ppa.launchpad.net/ondrej/php/ubuntu {{ salt['grains.get']('oscodename') }} main" + file: /etc/apt/sources.list.d/php-sury.list + # yamllint disable-line rule:line-length + key_url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c