Skip to content

Commit

Permalink
ci(kitchen+travis): bring into line with template-formula
Browse files Browse the repository at this point in the history
DEPRECATION: this change removes automated testing of the Amazon Linux v1
platform from Travis CI, however this platform can still be tested
locally.
  • Loading branch information
dafyddj committed Jul 10, 2019
1 parent 76b8ac3 commit 34f05bd
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 31 deletions.
34 changes: 30 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,42 @@ stages:
sudo: required
cache: bundler
language: ruby
dist: xenial

services:
- docker

# Make sure the instances listed below match up with
# the `platforms` defined in `kitchen.yml`
env:
- PLATFORM=ubuntu
- PLATFORM=centos
- PLATFORM=amazon
matrix:
- INSTANCE: debian-9-develop-py3
# - INSTANCE: ubuntu-1804-develop-py3
# - INSTANCE: centos-7-develop-py3
# - INSTANCE: fedora-30-develop-py3
# - INSTANCE: opensuse-leap-15-develop-py3
# - INSTANCE: debian-9-2019-2-py3
- INSTANCE: ubuntu-1804-2019-2-py3
- INSTANCE: centos-7-2019-2-py3
# - INSTANCE: fedora-30-2019-2-py3
# - INSTANCE: opensuse-leap-15-2019-2-py3
# - INSTANCE: debian-9-2018-3-py2
# - INSTANCE: ubuntu-1604-2018-3-py2
# - INSTANCE: centos-7-2018-3-py2
- INSTANCE: fedora-29-2018-3-py2
# TODO: Use this when fixed instead of `opensuse-leap-42`
# Ref: https://github.com/netmanagers/salt-image-builder/issues/2
# - INSTANCE: opensuse-leap-15-2018-3-py2
- INSTANCE: opensuse-leap-42-2018-3-py2
- INSTANCE: debian-8-2017-7-py2
# - INSTANCE: ubuntu-1604-2017-7-py2
# TODO: Enable after improving the formula to work with other than `systemd`
# - INSTANCE: centos-6-2017-7-py2
# - INSTANCE: fedora-29-2017-7-py2
# - INSTANCE: opensuse-leap-15-2017-7-py2

script: bundle exec kitchen test ${PLATFORM}
script:
- bundle exec kitchen test ${INSTANCE}

jobs:
include:
Expand Down
6 changes: 3 additions & 3 deletions FORMULA
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: vault
os: Debian, Ubuntu, RedHat, Fedora, CentOS, Amazon
os_family: Debian, RedHat
os: Debian, Ubuntu, RedHat, Fedora, CentOS, Amazon, SUSE
os_family: Debian, RedHat, Suse
version: 1.0.6
release: 1
minimum_version: 2018.3
minimum_version: 2017.7
summary: Vault formula
description: Formula to install and configure Hashicorp Vault
top_level_dir: vault
144 changes: 120 additions & 24 deletions kitchen.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,136 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# For help on this file's format, see https://kitchen.ci/
driver:
name: docker
use_sudo: false
privileged: true
run_command: /sbin/init
provision_command:
- curl -L https://bootstrap.saltstack.com | sh -s -- -X # install Salt and dependencies here to make use of Docker build cache, speeding up tests massively
run_command: /lib/systemd/systemd

verifier:
name: inspec
# Make sure the platforms listed below match up with
# the `env.matrix` instances defined in `.travis.yml`
platforms:
- name: amazonlinux
driver:
image: amazonlinux:1
platform: rhel
run_command: /sbin/init
provision_command:
- curl -L https://bootstrap.saltstack.com | sh -s -- -X # install latest stable Salt

## SALT `develop`
- name: debian-9-develop-py3
driver:
image: netmanagers/salt-develop-py3:debian-9
provision_command:
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
- name: ubuntu-1804-develop-py3
driver:
image: netmanagers/salt-develop-py3:ubuntu-18.04
provision_command:
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
- name: centos-7-develop-py3
driver:
image: netmanagers/salt-develop-py3:centos-7
provision_command:
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
- name: fedora-30-develop-py3
driver:
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
- name: opensuse-leap-15-develop-py3
driver:
image: netmanagers/salt-develop-py3:opensuse-leap-15
provision_command:
- 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

## SALT 2019.2
- 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
driver:
image: netmanagers/salt-2019.2-py3:centos-7
- name: fedora-30-2019-2-py3
driver:
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

## SALT 2018.3
- name: debian-9-2018-3-py2
driver:
image: netmanagers/salt-2018.3-py2:debian-9
- name: ubuntu-1604-2018-3-py2
driver:
image: netmanagers/salt-2018.3-py2:ubuntu-16.04
- name: centos-7-2018-3-py2
driver:
image: netmanagers/salt-2018.3-py2:centos-7
- name: fedora-29-2018-3-py2
driver:
image: netmanagers/salt-2018.3-py2:fedora-29
# TODO: Use this when fixed instead of `opensuse-leap-42`
# Ref: https://github.com/netmanagers/salt-image-builder/issues/2
# - name: opensuse-leap-15-2018-3-py2
# driver:
# image: netmanagers/salt-2018.3-py2:opensuse-leap-15
# run_command: /usr/lib/systemd/systemd
- name: opensuse-leap-42-2018-3-py2
driver:
image: netmanagers/salt-2018.3-py2:opensuse-leap-42
run_command: /usr/lib/systemd/systemd

## SALT 2017.7
- name: debian-8-2017-7-py2
driver:
image: netmanagers/salt-2017.7-py2:debian-8
- name: ubuntu-1604-2017-7-py2
driver:
image: netmanagers/salt-2017.7-py2:ubuntu-16.04
# TODO: Modify the formula to work for non-`systemd` platforms
- name: centos-6-2017-7-py2
driver:
image: netmanagers/salt-2017.7-py2:centos-6
run_command: /sbin/init
- name: fedora-29-2017-7-py2
driver:
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
run_command: /usr/lib/systemd/systemd

provisioner:
name: salt_solo
salt_version: latest
log_level: info
salt_install: none
require_chef: false
formula: vault
salt_copy_filter:
- .kitchen
- .git

platforms:
- name: ubuntu-16.04
driver:
name: docker
provision_command:
- apt-get install -y locales net-tools && locale-gen en_US.UTF-8
- curl -L https://bootstrap.saltstack.com | sh -s -- -X
- name: centos-7
driver:
name: docker
provision_command:
- yum -y install net-tools # needed by inspec
- curl -L https://bootstrap.saltstack.com | sh -s -- -X
- name: amazonlinux
driver:
name: docker
image: amazonlinux:1
platform: rhel
verifier:
# https://www.inspec.io/
name: inspec
sudo: true
# cli, documentation, html, progress, json, json-min, json-rspec, junit
reporter:
- cli

suites:
- name: install_binary
Expand Down

0 comments on commit 34f05bd

Please sign in to comment.