Переглянути джерело

ci(travis): update test matrix

tags/v0.55.0
Eric Veiras Galisson 5 роки тому
джерело
коміт
cd58d3b7ad
2 змінених файлів з 179 додано та 119 видалено
  1. +15
    -51
      .travis.yml
  2. +164
    -68
      kitchen.yml

+ 15
- 51
.travis.yml Переглянути файл

@@ -1,9 +1,3 @@
stages:
- test
- commitlint
- name: release
if: branch = master AND type != pull_request

sudo: required
cache: bundler
language: ruby
@@ -12,55 +6,25 @@ services:
- docker

before_install:
- gem install bundle
- gem install bundler
- bundle install

# Make sure the instances listed below match up with
# the `platforms` defined in `kitchen.yml`
env:
matrix:
- INSTANCE: default-debian-9
- INSTANCE: default-debian-8
- INSTANCE: default-ubuntu-1804
- INSTANCE: default-ubuntu-1604
- INSTANCE: default-centos-7
# - INSTANCE: default-centos-6
- INSTANCE: default-fedora
- INSTANCE: default-opensuse-leap-salt-minion

script:
- bundle exec kitchen verify ${INSTANCE}
- INSTANCE: v2019-2-py3-debian-9
- INSTANCE: v2019-2-py3-ubuntu-1804
- INSTANCE: v2019-2-py3-centos-7
- INSTANCE: v2019-2-py2-fedora-29

jobs:
include:
# Define the commitlint stage
- stage: commitlint
language: node_js
node_js: lts/*
before_install: skip
script:
- npm install @commitlint/config-conventional -D
- npm install @commitlint/travis-cli -D
- commitlint-travis
# Define the release stage that runs semantic-release
- stage: release
language: node_js
node_js: lts/*
before_install: skip
script:
# Update `AUTHORS.md`
- export MAINTAINER_TOKEN=${GH_TOKEN}
- go get github.com/myii/maintainer
- maintainer contributor
- INSTANCE: v2018-3-py2-debian-8
- INSTANCE: v2018-3-py2-ubuntu-1604
- INSTANCE: v2018-3-py2-bootstrap-centos-6
- INSTANCE: v2018-3-py2-forced-version-fedora-28
- INSTANCE: v2018-3-py2-opensuse-423

# Install all dependencies required for `semantic-release`
- npm install @semantic-release/changelog@3 -D
- npm install @semantic-release/exec@3 -D
- npm install @semantic-release/git@7 -D
deploy:
provider: script
skip_cleanup: true
script:
# Run `semantic-release`
- npx semantic-release@15
- INSTANCE: v2017-7-py2-debian-8
- INSTANCE: v2017-7-py2-ubuntu-1604
- INSTANCE: v2017-7-py2-bootstrap-centos-6

script:
- bundle exec kitchen verify ${INSTANCE}

+ 164
- 68
kitchen.yml Переглянути файл

@@ -1,104 +1,200 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# For help on this file's format, see https://kitchen.ci/
driver:
name: docker

driver_config:
use_sudo: false
privileged: true
provision_command: mkdir -p /run/sshd
run_command: /lib/systemd/systemd

# Make sure the platforms listed below match up with
# the `env.matrix` instances defined in `.travis.yml`
platforms:
# The `run_command` used for each platform is required to
# test `systemd` services in docker
# Latest distros
- name: debian-9
driver_config:
image: debian:9
run_command: /lib/systemd/systemd
provision_command:
- apt-get update && apt-get install -y udev
- name: debian-8
driver_config:
image: debian:8
run_command: /lib/systemd/systemd
provision_command:
- apt-get update && apt-get install -y udev
- name: ubuntu-18.04
driver_config:
image: ubuntu:18.04
run_command: /lib/systemd/systemd
provision_command:
- apt-get update && apt-get install -y udev
- name: ubuntu-16.04
driver_config:
image: ubuntu:16.04
run_command: /lib/systemd/systemd
provision_command:
- apt-get update && apt-get install -y udev
- name: centos-7
driver_config:
image: centos:7
run_command: /usr/lib/systemd/systemd
# - name: centos-6
# driver_config:
# image: centos:6
# run_command: /usr/lib/systemd/systemd
- name: fedora
driver_config:
image: fedora
- name: fedora-29
- name: opensuse-42.3
driver:
run_command: /usr/lib/systemd/systemd
provision_command:
- yum -y update && yum -y install udev
# As of February 2019, there have been problems getting `opensuse` to work:
# * `opensuse` is deprecated
# * `opensuse/leap` grabs `15.x`, which doesn't run the `inspec` tests
# * `opensuse/tumbleweed` doesn't install `salt-minion`
# * `opensuse/leap:42.3` does work
# * `opensuse/salt-minion` uses `42.3` with `salt-minion` pre-installed
- name: opensuse-leap-salt-minion
driver_config:
image: opensuse/salt-minion
run_command: /usr/lib/systemd/systemd
provision_command:
- zypper refresh && zypper install -y udev
- systemctl enable sshd.service
- cat /etc/os-release

# Previous distros
- name: debian-8
- name: ubuntu-16.04
- name: fedora-28
# centos-6 guest fails on Debian hosts due to vsyscall issues, see
# https://hub.docker.com/_/centos, "A note about vsyscall"
- name: centos-6
driver:
run_command: /sbin/init

provisioner:
name: salt_solo
log_level: debug
require_chef: false
log_level: info
salt_version: latest
require_chef: false
formula: nginx
salt_copy_filter:
- .kitchen
- .git
pillars_from_files:
nginx.sls: test/salt/default/pillar/nginx.sls
state_top:
base:
'*':
- nginx.ng
pillars:
top.sls:
base:
'*':
- nginx
state_top:
base:
'*':
- nginx.ng
pillars_from_files:
nginx.sls: test/salt/default/pillar/nginx.sls

verifier:
# https://www.inspec.io/
name: inspec
sudo: true
# cli, documentation, html, progress, json, json-min, json-rspec, junit
reporter:
- cli
inspec_tests:
- path: test/integration/default

suites:
- name: default
# Latest distros, latest salt, python3
# These distros have py3 packages available in salt's repo
- name: v2019-2-py3
includes:
- debian-9
- ubuntu-18.04
- centos-7
provisioner:
# If we don't force bootstrapping with python3, centos bootstraps using python2
# and then, when switching the repo to python3 and tries to install
# the packages, complains with
# Downloading packages:
# https://repo.saltstack.com/py3/re.........rpm: [Errno -1] Package does not
# match intended download. Suggestion: run yum --enablerepo=saltstack clean metadata
salt_bootstrap_options: -X -x python3 -d git %s
salt_version: '2019.2'
pillars:
salt.sls:
salt:
release: '2019.2'
py_ver: 'py3'

verifier:
inspec_tests:
#- path: test/integration/2019-2
- path: test/integration/default

# Latest distros, latest salt, python2
# Fedora ships updated py2 versions in their own repos
- name: v2019-2-py2
includes:
- fedora-29
provisioner:
salt_version: '2019.2'
pillars:
salt.sls:
salt:
release: '2019.2'
py_ver: 'py2'

verifier:
inspec_tests:
#- path: test/integration/2019-2
- path: test/integration/default

# Previous distros, previous salt, python2
- name: v2018-3-py2
includes:
- debian-8
- ubuntu-16.04
- opensuse-42.3
provisioner:
# We require an old version of salt in the provisioner or,
# the salt formula fails to downgrade to the desired version to test
salt_version: '2018.3'
pillars:
salt.sls:
salt:
release: '2018.3'
py_ver: 'py2'
verifier:
inspec_tests:
#- path: test/integration/2018-3
- path: test/integration/default

# centos-6 ships with python2.6, so it requires extra bootstrapping parameters
# to install python2.7
- name: v2018-3-py2-bootstrap
includes:
- centos-6
provisioner:
salt_bootstrap_options: -X -d stable %s
salt_version: '2018.3'
pillars:
salt.sls:
salt:
release: '2018.3'
py_ver: 'py2'
verifier:
inspec_tests:
#- path: test/integration/2018-3
- path: test/integration/default

# To tests fedora 28 & salt v2018.2, we need to force the package version
# otherwise the image, which includes the 'updates' repo, will install 2019.2
- name: v2018-3-py2-forced-version
includes:
- fedora-28
provisioner:
# We require an old version of salt in the provisioner or,
# the salt formula fails to downgrade to the desired version to test
salt_version: '2018.3'
pillars:
salt.sls:
salt:
release: '2018.3'
py_ver: 'py2'
version: '2018.3.0-1.fc28'

verifier:
inspec_tests:
#- path: test/integration/2018-3
- path: test/integration/default

# Previous distros, oldest salt, python2
- name: v2017-7-py2
includes:
- debian-8
- ubuntu-16.04
provisioner:
# We require an old version of salt in the provisioner or,
# the salt formula fails to downgrade to the desired version to test
salt_version: '2017.7'
pillars:
salt.sls:
salt:
release: '2017.7'
py_ver: 'py2'
verifier:
inspec_tests:
#- path: test/integration/2017-7
- path: test/integration/default

# centos-6 ships with python2.6, so it requires extra bootstrapping parameters
# to install python2.7
- name: v2017-7-py2-bootstrap
includes:
- centos-6
provisioner:
# As centos-6 ships with python2.6, we use the bootstrapper to install python2.7
salt_bootstrap_options: -X -d stable %s
salt_version: '2017.7'
pillars:
salt.sls:
salt:
release: '2017.7'
py_ver: 'py2'
verifier:
inspec_tests:
#- path: test/integration/2017-7
- path: test/integration/default


Завантаження…
Відмінити
Зберегти