feat(semantic-release): update for this formula

* Updated using https://github.com/myii/ssf-formula/pull/34
This commit is contained in:
Imran Iqbal 2020-01-15 18:05:34 +00:00
parent edb0d73ffe
commit 1755f76fde
No known key found for this signature in database
GPG key ID: 6D8629439D2B7819
11 changed files with 359 additions and 187 deletions

10
.rubocop.yml Normal file
View file

@ -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`

14
.salt-lint Normal file
View file

@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
exclude_paths: []
rules: {}
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

View file

@ -1,79 +1,101 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# vim: ft=yaml # vim: ft=yaml
--- ---
stages: ## Machine config
- test os: 'linux'
- commitlint arch: 'amd64'
- name: release dist: 'bionic'
if: branch = master AND type != pull_request version: '~> 1.0'
sudo: required ## Language and cache config
cache: bundler language: 'ruby'
language: ruby cache: 'bundler'
dist: xenial
## Services config
services: services:
- docker - docker
# Make sure the instances listed below match up with ## Script to run for the test stage
# the `platforms` defined in `kitchen.yml`
# NOTE: Please try to select up to six instances that add some meaningful
# testing of the formula's behaviour. If possible, try to refrain from
# the classical "chosing all the instances because I want to test on
# another/all distro/s" trap: it will just add time to the testing (see
# the discussion on #121). As an example, the set chosen below covers
# the most used distros families, systemd and non-systemd and the latest
# three supported Saltstack versions with python2 and 3.
# As for `kitchen.yml`, that should still contain all of the platforms,
# to allow for comprehensive local testing
# Ref: https://github.com/saltstack-formulas/template-formula/issues/118
# Ref: https://github.com/saltstack-formulas/template-formula/issues/121
env:
matrix:
# - INSTANCE: debian-debian-10-develop-py3
# - INSTANCE: ubuntu-ubuntu-1804-develop-py3
# - INSTANCE: centos-centos-7-develop-py3
# - INSTANCE: fedora30-fedora-30-develop-py3
# - INSTANCE: suse-opensuse-leap-15-develop-py3
- INSTANCE: amazonlinux-amazonlinux-2-develop-py2
# - INSTANCE: debian-debian-9-2019-2-py3
# - INSTANCE: ubuntu-ubuntu-1804-2019-2-py3
# - INSTANCE: centos-centos-7-2019-2-py3
# - INSTANCE: fedora30-fedora-30-2019-2-py3
# - INSTANCE: suse-opensuse-leap-15-2019-2-py3
- INSTANCE: amazonlinux-amazonlinux-2-2019-2-py2
# - INSTANCE: debian-debian-9-2018-3-py2
# - INSTANCE: ubuntu-ubuntu-1604-2018-3-py2
# - INSTANCE: centos-centos-7-2018-3-py2
# - INSTANCE: fedora29-fedora-29-2018-3-py2
# - INSTANCE: suse-opensuse-leap-15-2018-3-py2
- INSTANCE: amazonlinux-amazonlinux-2-2018-3-py2
# - INSTANCE: debian-debian-8-2017-7-py2
# - INSTANCE: ubuntu-ubuntu-1604-2017-7-py2
# - INSTANCE: centos-centos-6-2017-7-py2
# - INSTANCE: fedora29-fedora-29-2017-7-py2
# - INSTANCE: suse-opensuse-leap-15-2017-7-py2
- INSTANCE: amazonlinux-amazonlinux-2-2017-7-py2
script: 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: jobs:
include: include:
# Define the commitlint stage ## Define the test stage that runs the linters (and testing matrix, if applicable)
- stage: commitlint
language: node_js # Run all of the linters in a single job
node_js: lts/* - language: 'node_js'
before_install: skip node_js: 'lts/*'
env: 'Lint'
name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint'
before_install: 'skip'
script: script:
- npm install @commitlint/config-conventional -D # Install and run `salt-lint`
- npm install @commitlint/travis-cli -D - pip install --user salt-lint
- git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst'
| xargs salt-lint
# Install and run `yamllint`
# Need at least `v1.17.0` for the `yaml-files` setting
- pip install --user yamllint>=1.17.0
- yamllint -s .
# Install and run `rubocop`
- gem install rubocop
- rubocop -d
# Run `shellcheck` (already pre-installed in Travis)
- shellcheck --version
- git ls-files -- '*.sh' '*.bash' '*.ksh'
| xargs shellcheck
# Install and run `commitlint`
- npm i -D @commitlint/config-conventional
@commitlint/travis-cli
- commitlint-travis - commitlint-travis
# Define the release stage that runs semantic-release
- stage: release ## Define the rest of the matrix based on Kitchen testing
language: node_js # Make sure the instances listed below match up with
node_js: lts/* # the `platforms` defined in `kitchen.yml`
before_install: skip - env: INSTANCE=debian-debian-10-master-py3
# - env: INSTANCE=ubuntu-ubuntu-1804-master-py3
# - env: INSTANCE=centos-centos-8-master-py3
# - env: INSTANCE=fedora-fedora-31-master-py3
# - env: INSTANCE=suse-opensuse-leap-151-master-py3
# - env: INSTANCE=amazon-amazonlinux-2-master-py2
# - env: INSTANCE=arch-arch-base-latest-master-py2
# - env: INSTANCE=debian-debian-10-2019-2-py3
# - env: INSTANCE=debian-debian-9-2019-2-py3
- env: INSTANCE=ubuntu-ubuntu-1804-2019-2-py3
# - env: INSTANCE=centos-centos-8-2019-2-py3
# - env: INSTANCE=fedora-fedora-31-2019-2-py3
- env: INSTANCE=suse-opensuse-leap-151-2019-2-py3
# - env: INSTANCE=centos-centos-7-2019-2-py2
- env: INSTANCE=amazon-amazonlinux-2-2019-2-py2
# - env: INSTANCE=arch-arch-base-latest-2019-2-py2
- env: INSTANCE=fedora-fedora-30-2018-3-py3
# - env: INSTANCE=debian-debian-9-2018-3-py2
# - env: INSTANCE=ubuntu-ubuntu-1604-2018-3-py2
- env: INSTANCE=centos-centos-7-2018-3-py2
# - env: INSTANCE=suse-opensuse-leap-151-2018-3-py2
# - env: INSTANCE=amazon-amazonlinux-2-2018-3-py2
# - env: INSTANCE=arch-arch-base-latest-2018-3-py2
# - env: INSTANCE=debian-debian-8-2017-7-py2
# - env: INSTANCE=ubuntu-ubuntu-1604-2017-7-py2
# - env: INSTANCE=centos-centos-6-2017-7-py2
# - env: INSTANCE=fedora-fedora-30-2017-7-py2
# - env: INSTANCE=suse-opensuse-leap-151-2017-7-py2
# - env: INSTANCE=amazon-amazonlinux-2-2017-7-py2
- env: INSTANCE=arch-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: script:
# Update `AUTHORS.md` # Update `AUTHORS.md`
- export MAINTAINER_TOKEN=${GH_TOKEN} - export MAINTAINER_TOKEN=${GH_TOKEN}
@ -81,12 +103,14 @@ jobs:
- maintainer contributor - maintainer contributor
# Install all dependencies required for `semantic-release` # Install all dependencies required for `semantic-release`
- npm install @semantic-release/changelog@3 -D - npm i -D @semantic-release/changelog@3
- npm install @semantic-release/exec@3 -D @semantic-release/exec@3
- npm install @semantic-release/git@7 -D @semantic-release/git@7
deploy: deploy:
provider: script provider: 'script'
skip_cleanup: true # Opt-in to `dpl v2` to complete the Travis build config validation (beta)
script: # * https://docs.travis-ci.com/user/build-config-validation
# Run `semantic-release` # Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default
- npx semantic-release@15 edge: true
# Run `semantic-release`
script: 'npx semantic-release@15.14'

36
.yamllint Normal file
View file

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# Extend the `default` configuration provided by `yamllint`
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
- '*.yaml'
- '*.yml'
- .salt-lint
- .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`)
max: 88
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true

11
Gemfile
View file

@ -1,6 +1,11 @@
source "https://rubygems.org" # frozen_string_literal: true
source 'https://rubygems.org'
gem 'kitchen-docker', '>= 2.9' gem 'kitchen-docker', '>= 2.9'
gem 'kitchen-salt', '>= 0.6.0'
gem 'kitchen-inspec', '>= 1.1' gem 'kitchen-inspec', '>= 1.1'
gem 'kitchen-salt', '>= 0.6.0'
# Latest versions of `train` cause failure when running `kitchen verify`
# Downgrading to `3.2.0` until this is fixed upstream
# https://github.com/inspec/train/pull/544#issuecomment-566055052
gem 'train', '3.2.0'

View file

@ -8,22 +8,25 @@
# this file is here to facilitate running it. # this file is here to facilitate running it.
# #
require "pathname" require 'pathname'
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
Pathname.new(__FILE__).realpath) 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.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub) load(bundle_binstub)
else else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. abort(
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") '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
end end
require "rubygems" require 'rubygems'
require "bundler/setup" require 'bundler/setup'
load Gem.bin_path("test-kitchen", "kitchen") load Gem.bin_path('test-kitchen', 'kitchen')

View file

@ -11,86 +11,128 @@ driver:
# Make sure the platforms listed below match up with # Make sure the platforms listed below match up with
# the `env.matrix` instances defined in `.travis.yml` # the `env.matrix` instances defined in `.travis.yml`
platforms: platforms:
## SALT `develop` ## SALT `master`
- name: debian-10-develop-py3 - name: debian-10-master-py3
driver: driver:
image: netmanagers/salt-develop-py3:debian-10 image: netmanagers/salt-master-py3:debian-10
provision_command: provision_command:
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop - sh bootstrap-salt.sh -XdPbfrq -x python3 git master
- name: ubuntu-1804-develop-py3 - apt-get install -y snapd
- name: ubuntu-1804-master-py3
driver: driver:
image: netmanagers/salt-develop-py3:ubuntu-18.04 image: netmanagers/salt-master-py3:ubuntu-18.04
provision_command: provision_command:
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop - sh bootstrap-salt.sh -XdPbfrq -x python3 git master
- name: centos-7-develop-py3 - name: centos-8-master-py3
driver: driver:
image: netmanagers/salt-develop-py3:centos-7 image: netmanagers/salt-master-py3:centos-8
provision_command: provision_command:
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop - sh bootstrap-salt.sh -XdPbfrq -x python3 git master
- name: fedora-30-develop-py3 - name: fedora-31-master-py3
driver: driver:
image: netmanagers/salt-develop-py3:fedora-30 image: netmanagers/salt-master-py3:fedora-31
provision_command: provision_command:
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop - sh bootstrap-salt.sh -XdPbfrq -x python3 git master
- name: opensuse-leap-15-develop-py3 - name: opensuse-leap-151-master-py3
driver: driver:
image: netmanagers/salt-develop-py3:opensuse-leap-15 image: netmanagers/salt-master-py3:opensuse-leap-15.1
provision_command: provision_command:
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop - sh bootstrap-salt.sh -XdPbfrq -x python3 git master
run_command: /usr/lib/systemd/systemd run_command: /usr/lib/systemd/systemd
- name: amazonlinux-2-develop-py2 # Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
# Use the `develop` image temporarily until the `master` image is available
# Not changing the name to minimise disruption across all of the formulas
- name: amazonlinux-2-master-py2
driver: driver:
image: netmanagers/salt-develop-py2:amazonlinux-2 image: netmanagers/salt-develop-py2:amazonlinux-2
provision_command: provision_command:
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
- sh bootstrap-salt.sh -XdPbfrq -x python2 git develop - sh bootstrap-salt.sh -XdPbfrq -x python2 git develop
- name: arch-base-latest-master-py2
driver:
image: netmanagers/salt-master-py2:arch-base-latest
provision_command:
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
- sh bootstrap-salt.sh -XdPbfrq -x python2 git master
run_command: /usr/lib/systemd/systemd
## SALT `2019.2` ## SALT `2019.2`
- name: debian-10-2019-2-py3
driver:
image: netmanagers/salt-2019.2-py3:debian-10
provision_command:
- apt-get install -y snapd
- name: debian-9-2019-2-py3 - name: debian-9-2019-2-py3
driver: driver:
image: netmanagers/salt-2019.2-py3:debian-9 image: netmanagers/salt-2019.2-py3:debian-9
provision_command:
- apt-get install -y snapd
- name: ubuntu-1804-2019-2-py3 - name: ubuntu-1804-2019-2-py3
driver: driver:
image: netmanagers/salt-2019.2-py3:ubuntu-18.04 image: netmanagers/salt-2019.2-py3:ubuntu-18.04
- name: centos-7-2019-2-py3 - name: centos-8-2019-2-py3
driver: driver:
image: netmanagers/salt-2019.2-py3:centos-7 image: netmanagers/salt-2019.2-py3:centos-8
- name: fedora-30-2019-2-py3 - name: fedora-31-2019-2-py3
driver: driver:
image: netmanagers/salt-2019.2-py3:fedora-30 image: netmanagers/salt-2019.2-py3:fedora-31
- name: opensuse-leap-15-2019-2-py3 - name: opensuse-leap-151-2019-2-py3
driver: driver:
image: netmanagers/salt-2019.2-py3:opensuse-leap-15 image: netmanagers/salt-2019.2-py3:opensuse-leap-15.1
run_command: /usr/lib/systemd/systemd run_command: /usr/lib/systemd/systemd
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: centos-7-2019-2-py2
driver:
image: netmanagers/salt-2019.2-py2:centos-7
- name: amazonlinux-2-2019-2-py2 - name: amazonlinux-2-2019-2-py2
driver: driver:
image: netmanagers/salt-2019.2-py2:amazonlinux-2 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` ## SALT `2018.3`
- name: fedora-30-2018-3-py3
driver:
image: netmanagers/salt-2018.3-py3:fedora-30
- name: debian-9-2018-3-py2 - name: debian-9-2018-3-py2
driver: driver:
image: netmanagers/salt-2018.3-py2:debian-9 image: netmanagers/salt-2018.3-py2:debian-9
provision_command:
- apt-get install -y snapd
- name: ubuntu-1604-2018-3-py2 - name: ubuntu-1604-2018-3-py2
driver: driver:
image: netmanagers/salt-2018.3-py2:ubuntu-16.04 image: netmanagers/salt-2018.3-py2:ubuntu-16.04
- name: centos-7-2018-3-py2 - name: centos-7-2018-3-py2
driver: driver:
image: netmanagers/salt-2018.3-py2:centos-7 image: netmanagers/salt-2018.3-py2:centos-7
- name: fedora-29-2018-3-py2 - name: opensuse-leap-151-2018-3-py2
driver: driver:
image: netmanagers/salt-2018.3-py2:fedora-29 image: netmanagers/salt-2018.3-py2:opensuse-leap-15.1
- name: opensuse-leap-15-2018-3-py2
driver:
image: netmanagers/salt-2018.3-py2:opensuse-leap-15
run_command: /usr/lib/systemd/systemd run_command: /usr/lib/systemd/systemd
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: amazonlinux-2-2018-3-py2 - name: amazonlinux-2-2018-3-py2
driver: driver:
image: netmanagers/salt-2018.3-py2:amazonlinux-2 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` ## SALT `2017.7`
- name: debian-8-2017-7-py2 - name: debian-8-2017-7-py2
@ -103,20 +145,28 @@ platforms:
driver: driver:
image: netmanagers/salt-2017.7-py2:centos-6 image: netmanagers/salt-2017.7-py2:centos-6
run_command: /sbin/init run_command: /sbin/init
- name: fedora-29-2017-7-py2 - name: fedora-30-2017-7-py2
driver: driver:
image: netmanagers/salt-2017.7-py2:fedora-29 image: netmanagers/salt-2017.7-py2:fedora-30
- name: opensuse-leap-15-2017-7-py2 - name: opensuse-leap-151-2017-7-py2
driver: driver:
image: netmanagers/salt-2017.7-py2:opensuse-leap-15 image: netmanagers/salt-2017.7-py2:opensuse-leap-15.1
run_command: /usr/lib/systemd/systemd run_command: /usr/lib/systemd/systemd
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: amazonlinux-2-2017-7-py2 - name: amazonlinux-2-2017-7-py2
driver: driver:
image: netmanagers/salt-2017.7-py2:amazonlinux-2 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: provisioner:
name: salt_solo name: salt_solo
log_level: info log_level: debug
salt_install: none salt_install: none
require_chef: false require_chef: false
formula: packages formula: packages
@ -135,7 +185,8 @@ verifier:
suites: suites:
- name: debian - name: debian
includes: includes:
- debian-10-develop-py3 - debian-10-master-py3
- debian-10-2019-2-py3
- debian-9-2019-2-py3 - debian-9-2019-2-py3
- debian-9-2018-3-py2 - debian-9-2018-3-py2
- debian-8-2017-7-py2 - debian-8-2017-7-py2
@ -143,6 +194,7 @@ suites:
state_top: state_top:
base: base:
'*': '*':
- node
- packages - packages
pillars: pillars:
top.sls: top.sls:
@ -150,14 +202,17 @@ suites:
'*': '*':
- packages - packages
pillars_from_files: pillars_from_files:
packages.sls: pillar.example packages.sls: test/salt/pillar/debian.sls
dependencies:
- name: node
repo: git
source: https://github.com/saltstack-formulas/node-formula.git
verifier: verifier:
inspec_tests: inspec_tests:
- path: test/integration/default - path: test/integration/default
- name: ubuntu - name: ubuntu
includes: includes:
- ubuntu-1804-develop-py3 - ubuntu-1804-master-py3
- ubuntu-1804-2019-2-py3 - ubuntu-1804-2019-2-py3
- ubuntu-1604-2018-3-py2 - ubuntu-1604-2018-3-py2
- ubuntu-1604-2017-7-py2 - ubuntu-1604-2017-7-py2
@ -165,6 +220,7 @@ suites:
state_top: state_top:
base: base:
'*': '*':
- golang.package
- packages - packages
pillars: pillars:
top.sls: top.sls:
@ -172,15 +228,20 @@ suites:
'*': '*':
- packages - packages
pillars_from_files: pillars_from_files:
packages.sls: test/salt/pillar/pillar.example.ubuntu.1804 packages.sls: test/salt/pillar/ubuntu.sls
dependencies:
- name: golang
repo: git
source: https://github.com/saltstack-formulas/golang-formula.git
verifier: verifier:
inspec_tests: inspec_tests:
- path: test/integration/default - path: test/integration/default
- name: fedora
- name: fedora30
includes: includes:
- fedora-30-develop-py3 - fedora-31-master-py3
- fedora-30-2019-2-py3 - fedora-31-2019-2-py3
- fedora-30-2018-3-py3
- fedora-30-2017-7-py2
provisioner: provisioner:
state_top: state_top:
base: base:
@ -192,94 +253,70 @@ suites:
'*': '*':
- packages - packages
pillars_from_files: pillars_from_files:
packages.sls: test/salt/pillar/pillar.example.fedora30 packages.sls: test/salt/pillar/fedora.sls
verifier: verifier:
inspec_tests: inspec_tests:
- path: test/integration/default - path: test/integration/default
- name: fedora29
includes:
- fedora-29-2018-3-py2
- fedora-29-2017-7-py2
provisioner:
state_top:
base:
'*':
- packages
pillars:
top.sls:
base:
'*':
- packages
pillars_from_files:
packages.sls: test/salt/pillar/pillar.example.fedora29
verifier:
inspec_tests:
- path: test/integration/default
- name: centos - name: centos
includes: includes:
- centos-7-develop-py3 - centos-8-master-py3
- centos-7-2019-2-py3 - centos-8-2019-2-py3
- centos-7-2019-2-py2
- centos-7-2018-3-py2 - centos-7-2018-3-py2
- centos-6-2017-7-py2 - centos-6-2017-7-py2
provisioner: provisioner:
state_top:
base:
'*':
- epel
- packages
pillars:
top.sls:
base:
'*':
- packages
pillars_from_files:
packages.sls: test/salt/pillar/redhat.sls
dependencies: dependencies:
- name: epel - name: epel
repo: git repo: git
source: https://github.com/saltstack-formulas/epel-formula.git source: https://github.com/saltstack-formulas/epel-formula.git
state_top:
base:
'*':
- packages
pillars:
top.sls:
base:
'*':
- packages
pillars_from_files:
packages.sls: test/salt/pillar/pillar.example.redhat
verifier: verifier:
inspec_tests: inspec_tests:
- path: test/integration/default - path: test/integration/default
- name: amazon
- name: amazonlinux
includes: includes:
- amazonlinux-2-develop-py2 - amazonlinux-2-master-py2
- amazonlinux-2-2019-2-py2 - amazonlinux-2-2019-2-py2
- amazonlinux-2-2018-3-py2 - amazonlinux-2-2018-3-py2
- amazonlinux-2-2017-7-py2 - amazonlinux-2-2017-7-py2
provisioner: provisioner:
state_top:
base:
'*':
- epel
- packages
pillars:
top.sls:
base:
'*':
- packages
pillars_from_files:
packages.sls: test/salt/pillar/amazon.sls
dependencies: dependencies:
- name: epel - name: epel
repo: git repo: git
source: https://github.com/saltstack-formulas/epel-formula.git source: https://github.com/saltstack-formulas/epel-formula.git
state_top:
base:
'*':
- packages
pillars:
top.sls:
base:
'*':
- packages
pillars_from_files:
packages.sls: test/salt/pillar/pillar.example.amazonlinux
verifier: verifier:
inspec_tests: inspec_tests:
- path: test/integration/default - path: test/integration/default
- name: suse - name: suse
includes: includes:
- opensuse-leap-15-develop-py3 - opensuse-leap-151-master-py3
- opensuse-leap-15-2019-2-py3 - opensuse-leap-151-2019-2-py3
- opensuse-leap-15-2018-3-py2 - opensuse-leap-151-2018-3-py2
- opensuse-leap-15-2017-7-py2 - opensuse-leap-151-2017-7-py2
provisioner: provisioner:
# dependencies:
# - name: epel
# repo: git
# source: https://github.com/saltstack-formulas/epel-formula.git
state_top: state_top:
base: base:
'*': '*':
@ -290,7 +327,28 @@ suites:
'*': '*':
- packages - packages
pillars_from_files: pillars_from_files:
packages.sls: test/salt/pillar/pillar.example.opensuse packages.sls: test/salt/pillar/opensuse.sls
verifier:
inspec_tests:
- path: test/integration/default
- name: arch
includes:
- arch-base-latest-master-py2
- arch-base-latest-2019-2-py2
- arch-base-latest-2018-3-py2
- arch-base-latest-2017-7-py2
provisioner:
state_top:
base:
'*':
- packages
pillars:
top.sls:
base:
'*':
- packages
pillars_from_files:
packages.sls: test/salt/pillar/arch.sls
verifier: verifier:
inspec_tests: inspec_tests:
- path: test/integration/default - path: test/integration/default

View file

@ -14,9 +14,9 @@ sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
sudo -H pip install m2r sudo -H pip install m2r
# Copy and then convert the `.md` docs # Copy and then convert the `.md` docs
cp *.md docs/ cp ./*.md docs/
cd docs/ cd docs/ || exit
m2r --overwrite *.md m2r --overwrite ./*.md
# Change excess `H1` headings to `H2` in converted `CHANGELOG.rst` # Change excess `H1` headings to `H2` in converted `CHANGELOG.rst`
sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst

18
release-rules.js Normal file
View file

@ -0,0 +1,18 @@
// No release is triggered for the types commented out below.
// Commits using these types will be incorporated into the next release.
//
// NOTE: Any changes here must be reflected in `CONTRIBUTING.md`.
module.exports = [
{breaking: true, release: 'major'},
// {type: 'build', release: 'patch'},
// {type: 'chore', release: 'patch'},
// {type: 'ci', release: 'patch'},
{type: 'docs', release: 'patch'},
{type: 'feat', release: 'minor'},
{type: 'fix', release: 'patch'},
{type: 'perf', release: 'patch'},
{type: 'refactor', release: 'patch'},
{type: 'revert', release: 'patch'},
{type: 'style', release: 'patch'},
{type: 'test', release: 'patch'},
];

View file

@ -63,7 +63,7 @@ module.exports = {
} }
if (typeof commit.hash === `string`) { if (typeof commit.hash === `string`) {
commit.hash = commit.hash.substring(0, 7) commit.shortHash = commit.hash.substring(0, 7)
} }
if (typeof commit.subject === `string`) { if (typeof commit.subject === `string`) {

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: default name: default
title: packages formula title: packages formula
maintainer: SaltStack Formulas maintainer: SaltStack Formulas
@ -12,3 +15,4 @@ supports:
- platform-name: suse - platform-name: suse
- platform-name: freebsd - platform-name: freebsd
- platform-name: amazon - platform-name: amazon
- platform-name: arch