From b0148bcf266154936a0795251385f29158599f28 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 29 Oct 2019 10:31:43 +0000 Subject: [PATCH] ci(kitchen+travis): upgrade matrix after `2019.2.2` release * Automated using https://github.com/myii/ssf-formula/pull/86 --- .travis.yml | 11 ++-- kitchen.yml | 74 ++++++++++++------------- test/integration/v201803-py3/README.md | 50 +++++++++++++++++ test/integration/v201803-py3/inspec.yml | 18 ++++++ 4 files changed, 109 insertions(+), 44 deletions(-) create mode 100644 test/integration/v201803-py3/README.md create mode 100644 test/integration/v201803-py3/inspec.yml diff --git a/.travis.yml b/.travis.yml index 3841a83c9..cb13d939f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ jobs: script: # Install and run `salt-lint` - pip install --user salt-lint - - git ls-files | grep '\.sls$\|\.jinja$\|\.j2$\|\.tmpl$' + - git ls-files | grep '\.sls$\|\.jinja$\|\.j2$\|\.tmpl$\|\.tst$' | xargs -I {} salt-lint {} # Install and run `yamllint` # Need at least `v1.17.0` for the `yaml-files` setting @@ -65,17 +65,16 @@ jobs: - env: INSTANCE=v201803-py2-centos-7-2018-3-py2 - env: INSTANCE=v201803-py2-amazonlinux-2-2018-3-py2 # - env: INSTANCE=v201803-py2-arch-base-latest-2018-3-py2 - - env: INSTANCE=v201902-py2-debian-9-2019-2-py2 + - env: INSTANCE=v201803-py3-fedora-30-2018-3-py3 - env: INSTANCE=v201902-py2-ubuntu-1804-2019-2-py2 # - env: INSTANCE=v201902-py2-centos-7-2019-2-py2 - # - env: INSTANCE=v201902-py2-opensuse-leap-15-2019-2-py2 # - env: INSTANCE=v201902-py2-amazonlinux-2-2019-2-py2 # - env: INSTANCE=v201902-py2-arch-base-latest-2019-2-py2 + - env: INSTANCE=v201902-py3-debian-10-2019-2-py3 # - env: INSTANCE=v201902-py3-debian-9-2019-2-py3 # - env: INSTANCE=v201902-py3-ubuntu-1804-2019-2-py3 - # - env: INSTANCE=v201902-py3-centos-7-2019-2-py3 - - env: INSTANCE=v201902-py3-fedora-30-2019-2-py3 - - env: INSTANCE=v201902-py3-opensuse-leap-15-2019-2-py3 + # - env: INSTANCE=v201902-py3-centos-8-2019-2-py3 + - env: INSTANCE=v201902-py3-opensuse-leap-151-2019-2-py3 ## Define the release stage that runs `semantic-release` - stage: release diff --git a/kitchen.yml b/kitchen.yml index fe3c66182..bb24922b9 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -47,32 +47,17 @@ platforms: driver: image: netmanagers/salt-2018.3-py2:arch-base-latest run_command: /usr/lib/systemd/systemd + - name: fedora-30-2018-3-py3 + driver: + image: netmanagers/salt-2018.3-py3:fedora-30 ## SALT `2019.2` - - name: debian-9-2019-2-py2 - driver: - image: netmanagers/salt-2019.2-py2:debian-9 - name: ubuntu-1804-2019-2-py2 driver: image: netmanagers/salt-2019.2-py2:ubuntu-18.04 - name: centos-7-2019-2-py2 driver: image: netmanagers/salt-2019.2-py2:centos-7 - - name: opensuse-leap-15-2019-2-py2 - 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: - salt_bootstrap_options: -XdPfrq -x python2 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: - max_ssh_sessions: 1 - name: amazonlinux-2-2019-2-py2 driver: image: netmanagers/salt-2019.2-py2:amazonlinux-2 @@ -80,30 +65,23 @@ platforms: driver: image: netmanagers/salt-2019.2-py2:arch-base-latest run_command: /usr/lib/systemd/systemd + - name: debian-10-2019-2-py3 + driver: + image: netmanagers/salt-2019.2-py3:debian-10 - name: debian-9-2019-2-py3 driver: image: netmanagers/salt-2019.2-py3:debian-9 - name: ubuntu-1804-2019-2-py3 driver: image: netmanagers/salt-2019.2-py3:ubuntu-18.04 - - name: centos-7-2019-2-py3 + - name: centos-8-2019-2-py3 driver: - image: netmanagers/salt-2019.2-py3:centos-7 - - name: fedora-30-2019-2-py3 + image: netmanagers/salt-2019.2-py3:centos-8 + - name: opensuse-leap-151-2019-2-py3 driver: - image: netmanagers/salt-2019.2-py3:fedora-30 - - name: opensuse-leap-15-2019-2-py3 - 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 + image: netmanagers/salt-2019.2-py3:opensuse-leap-15.1 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`: + # Workaround to avoid intermittent failures on `opensuse-leap-15.1`: # => SCP did not finish successfully (255): (Net::SCP::Error) transport: max_ssh_sessions: 1 @@ -129,11 +107,11 @@ verifier: suites: - name: v201902-py3 includes: + - debian-10-2019-2-py3 - debian-9-2019-2-py3 - ubuntu-1804-2019-2-py3 - - centos-7-2019-2-py3 - - fedora-30-2019-2-py3 - - opensuse-leap-15-2019-2-py3 + - centos-8-2019-2-py3 + - opensuse-leap-151-2019-2-py3 provisioner: state_top: base: @@ -155,10 +133,8 @@ suites: - path: test/integration/v201902-py3 - name: v201902-py2 includes: - - debian-9-2019-2-py2 - ubuntu-1804-2019-2-py2 - centos-7-2019-2-py2 - - opensuse-leap-15-2019-2-py2 - amazonlinux-2-2019-2-py2 - arch-base-latest-2019-2-py2 provisioner: @@ -180,6 +156,28 @@ suites: verifier: inspec_tests: - path: test/integration/v201902-py2 + - name: v201803-py3 + includes: + - fedora-30-2018-3-py3 + provisioner: + state_top: + base: + '*': + - salt.pkgrepo + - salt.master + - salt.minion + pillars: + top.sls: + base: + '*': + - salt + - v201803-py3 + pillars_from_files: + salt.sls: test/salt/pillar/salt.sls + v201803-py3.sls: test/salt/pillar/v201803-py3.sls + verifier: + inspec_tests: + - path: test/integration/v201803-py3 - name: v201803-py2 includes: - debian-9-2018-3-py2 diff --git a/test/integration/v201803-py3/README.md b/test/integration/v201803-py3/README.md new file mode 100644 index 000000000..07a8e06a5 --- /dev/null +++ b/test/integration/v201803-py3/README.md @@ -0,0 +1,50 @@ +# InSpec Profile: `v201803-py3` + +This shows the implementation of the `v201803-py3` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md). + +## Verify a profile + +InSpec ships with built-in features to verify a profile structure. + +```bash +$ inspec check v201803-py3 +Summary +------- +Location: v201803-py3 +Profile: profile +Controls: 4 +Timestamp: 2019-06-24T23:09:01+00:00 +Valid: true + +Errors +------ + +Warnings +-------- +``` + +## Execute a profile + +To run all **supported** controls on a local machine use `inspec exec /path/to/profile`. + +```bash +$ inspec exec v201803-py3 +.. + +Finished in 0.0025 seconds (files took 0.12449 seconds to load) +8 examples, 0 failures +``` + +## Execute a specific control from a profile + +To run one control from the profile use `inspec exec /path/to/profile --controls name`. + +```bash +$ inspec exec v201803-py3 --controls package +. + +Finished in 0.0025 seconds (files took 0.12449 seconds to load) +1 examples, 0 failures +``` + +See an [example control here](https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb). diff --git a/test/integration/v201803-py3/inspec.yml b/test/integration/v201803-py3/inspec.yml new file mode 100644 index 000000000..85bc2cfeb --- /dev/null +++ b/test/integration/v201803-py3/inspec.yml @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +name: v201803-py3 +title: salt formula +maintainer: SaltStack Formulas +license: Apache-2.0 +summary: Verify that Salt `v201803-py3` is setup and configured +supports: + - platform-name: debian + - platform-name: ubuntu + - platform-name: centos + - platform-name: fedora + - platform-name: opensuse + - platform-name: suse + - platform-name: freebsd + - platform-name: amazon + - platform-name: arch