chore: use `semantic-release` cross-formula standard structuretags/v0.9.0
@@ -48,6 +48,7 @@ coverage.xml | |||
.kitchen | |||
.kitchen.local.yml | |||
kitchen.local.yml | |||
junit-*.xml | |||
# Translations | |||
*.mo | |||
@@ -111,3 +112,11 @@ docs/*.md | |||
# Vim | |||
*.sw? | |||
## Collected when centralising formulas (check and sort) | |||
# `collectd-formula` | |||
.pytest_cache/ | |||
/.idea/ | |||
Dockerfile.*_* | |||
ignore/ | |||
tmp/ |
@@ -7,36 +7,26 @@ 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` | |||
# 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: repositories-debian-9-develop-py3 | |||
# - INSTANCE: repositories-ubuntu-1804-develop-py3 | |||
- INSTANCE: repositories-debian-9-2019-2-py3 | |||
- INSTANCE: repositories-ubuntu-1804-2019-2-py3 | |||
- INSTANCE: preferences-debian-9-develop-py3 | |||
# - INSTANCE: repositories-ubuntu-1804-develop-py3 | |||
# - INSTANCE: preferences-ubuntu-1804-develop-py3 | |||
- INSTANCE: repositories-debian-9-2019-2-py3 | |||
- INSTANCE: preferences-debian-9-2019-2-py3 | |||
- INSTANCE: repositories-ubuntu-1804-2019-2-py3 | |||
- INSTANCE: preferences-ubuntu-1804-2019-2-py3 | |||
script: | |||
- bundle exec kitchen verify ${INSTANCE} | |||
- bin/kitchen verify ${INSTANCE} | |||
jobs: | |||
include: |
@@ -156,3 +156,4 @@ An example of that: | |||
BREAKING CHANGE: With the removal of all of the `.sls` files under | |||
`template package`, this formula no longer supports the installation of | |||
packages. | |||
@@ -25,7 +25,7 @@ platforms: | |||
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com | |||
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop | |||
## SALT 2019.2 | |||
## SALT `2019.2` | |||
- name: debian-9-2019-2-py3 | |||
driver: | |||
image: netmanagers/salt-2019.2-py3:debian-9 | |||
@@ -42,11 +42,6 @@ provisioner: | |||
salt_copy_filter: | |||
- .kitchen | |||
- .git | |||
pillars: | |||
top.sls: | |||
base: | |||
'*': | |||
- apt | |||
verifier: | |||
# https://www.inspec.io/ | |||
@@ -64,6 +59,11 @@ suites: | |||
'*': | |||
- apt.repositories | |||
- apt.update | |||
pillars: | |||
top.sls: | |||
base: | |||
'*': | |||
- apt | |||
pillars_from_files: | |||
apt.sls: test/salt/pillar/repositories.pillar.sls | |||
verifier: | |||
@@ -75,6 +75,11 @@ suites: | |||
base: | |||
'*': | |||
- apt.preferences | |||
pillars: | |||
top.sls: | |||
base: | |||
'*': | |||
- apt | |||
pillars_from_files: | |||
apt.sls: test/salt/pillar/preferences.pillar.sls | |||
verifier: |
@@ -0,0 +1,50 @@ | |||
# InSpec Profile: `preferences` | |||
This shows the implementation of the `preferences` 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 preferences | |||
Summary | |||
------- | |||
Location: preferences | |||
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 preferences | |||
.. | |||
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 preferences --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). |
@@ -1,8 +1,8 @@ | |||
name: preferences | |||
title: Apt Formula | |||
maintainer: Saltstack-formulas org | |||
title: apt formula | |||
maintainer: SaltStack Formulas | |||
license: Apache-2.0 | |||
summary: Verify that the apt preferences are configured correctly | |||
supports: | |||
- os-name: debian | |||
- os-name: ubuntu | |||
- platform-name: debian | |||
- platform-name: ubuntu |
@@ -0,0 +1,50 @@ | |||
# InSpec Profile: `repositories` | |||
This shows the implementation of the `repositories` 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 repositories | |||
Summary | |||
------- | |||
Location: repositories | |||
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 repositories | |||
.. | |||
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 repositories --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). |
@@ -1,8 +1,8 @@ | |||
name: repositories | |||
title: Apt Formula | |||
maintainer: Saltstack-formulas org | |||
title: apt formula | |||
maintainer: SaltStack Formulas | |||
license: Apache-2.0 | |||
summary: Verify that the apt repositories are configured correctly | |||
supports: | |||
- os-name: debian | |||
- os-name: ubuntu | |||
- platform-name: debian | |||
- platform-name: ubuntu |