Skip to content

Commit d921a49

Browse files
committed
feat: implement semantic release
1 parent 184f968 commit d921a49

21 files changed

Lines changed: 1971 additions & 59 deletions

.github/workflows/commitlint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
name: Commitlint
5+
'on': [pull_request]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
env:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- uses: wagoid/commitlint-github-action@v1

.gitignore

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a packager
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.kitchen
49+
.kitchen.local.yml
50+
kitchen.local.yml
51+
junit-*.xml
52+
53+
# Translations
54+
*.mo
55+
*.pot
56+
57+
# Django stuff:
58+
*.log
59+
local_settings.py
60+
61+
# Flask stuff:
62+
instance/
63+
.webassets-cache
64+
65+
# Scrapy stuff:
66+
.scrapy
67+
68+
# Sphinx documentation
69+
docs/_build/
70+
71+
# PyBuilder
72+
target/
73+
74+
# Jupyter Notebook
75+
.ipynb_checkpoints
76+
77+
# pyenv
78+
.python-version
79+
80+
# celery beat schedule file
81+
celerybeat-schedule
82+
83+
# SageMath parsed files
84+
*.sage.py
85+
86+
# dotenv
87+
.env
88+
89+
# virtualenv
90+
.venv
91+
venv/
92+
ENV/
93+
94+
# Spyder project settings
95+
.spyderproject
96+
.spyproject
97+
98+
# Rope project settings
99+
.ropeproject
100+
101+
# mkdocs documentation
102+
/site
103+
104+
# mypy
105+
.mypy_cache/
106+
107+
# Bundler
108+
.bundle/
109+
110+
# copied `.md` files used for conversion to `.rst` using `m2r`
111+
docs/*.md
112+
113+
# Vim
114+
*.sw?
115+
116+
## Collected when centralising formulas (check and sort)
117+
# `collectd-formula`
118+
.pytest_cache/
119+
/.idea/
120+
Dockerfile.*_*
121+
ignore/
122+
tmp/

.kitchen.yml

Lines changed: 163 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,186 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
13
---
4+
# For help on this file's format, see https://kitchen.ci/
25
driver:
36
name: docker
4-
5-
driver_config:
67
use_sudo: false
78
privileged: true
8-
provision_command: mkdir -p /run/sshd
99
run_command: /lib/systemd/systemd
1010

11+
# Make sure the platforms listed below match up with
12+
# the `env.matrix` instances defined in `.travis.yml`
1113
platforms:
12-
- name: debian-9
13-
# - name: ubuntu-18.04
14-
# - name: fedora-27
15-
# - name: centos-7
14+
## SALT `master`
15+
- name: debian-10-master-py3
16+
driver:
17+
image: netmanagers/salt-master-py3:debian-10
18+
- name: ubuntu-1804-master-py3
19+
driver:
20+
image: netmanagers/salt-master-py3:ubuntu-18.04
21+
- name: centos-8-master-py3
22+
driver:
23+
image: netmanagers/salt-master-py3:centos-8
24+
- name: fedora-31-master-py3
25+
driver:
26+
image: netmanagers/salt-master-py3:fedora-31
27+
- name: opensuse-leap-151-master-py3
28+
driver:
29+
image: netmanagers/salt-master-py3:opensuse-leap-15.1
30+
run_command: /usr/lib/systemd/systemd
31+
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
32+
# => SCP did not finish successfully (255): (Net::SCP::Error)
33+
transport:
34+
max_ssh_sessions: 1
35+
- name: amazonlinux-2-master-py3
36+
driver:
37+
image: netmanagers/salt-master-py3:amazonlinux-2
38+
39+
## SALT `3000.3`
40+
- name: debian-10-3000-3-py3
41+
driver:
42+
image: netmanagers/salt-3000.3-py3:debian-10
43+
- name: debian-9-3000-3-py3
44+
driver:
45+
image: netmanagers/salt-3000.3-py3:debian-9
46+
- name: ubuntu-1804-3000-3-py3
47+
driver:
48+
image: netmanagers/salt-3000.3-py3:ubuntu-18.04
49+
- name: centos-8-3000-3-py3
50+
driver:
51+
image: netmanagers/salt-3000.3-py3:centos-8
52+
- name: centos-7-3000-3-py3
53+
driver:
54+
image: netmanagers/salt-3000.3-py3:centos-7
55+
- name: fedora-31-3000-3-py3
56+
driver:
57+
image: netmanagers/salt-3000.3-py3:fedora-31
58+
- name: opensuse-leap-151-3000-3-py3
59+
driver:
60+
image: netmanagers/salt-3000.3-py3:opensuse-leap-15.1
61+
run_command: /usr/lib/systemd/systemd
62+
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
63+
# => SCP did not finish successfully (255): (Net::SCP::Error)
64+
transport:
65+
max_ssh_sessions: 1
66+
- name: amazonlinux-2-3000-3-py3
67+
driver:
68+
image: netmanagers/salt-3000.3-py3:amazonlinux-2
69+
- name: ubuntu-1804-3000-3-py2
70+
driver:
71+
image: netmanagers/salt-3000.3-py2:ubuntu-18.04
72+
- name: ubuntu-1604-3000-3-py2
73+
driver:
74+
image: netmanagers/salt-3000.3-py2:ubuntu-16.04
75+
- name: arch-base-latest-3000-3-py2
76+
driver:
77+
image: netmanagers/salt-3000.3-py2:arch-base-latest
78+
run_command: /usr/lib/systemd/systemd
79+
80+
## SALT `2019.2`
81+
- name: debian-10-2019-2-py3
82+
driver:
83+
image: netmanagers/salt-2019.2-py3:debian-10
84+
- name: debian-9-2019-2-py3
85+
driver:
86+
image: netmanagers/salt-2019.2-py3:debian-9
87+
- name: ubuntu-1804-2019-2-py3
88+
driver:
89+
image: netmanagers/salt-2019.2-py3:ubuntu-18.04
90+
- name: ubuntu-1604-2019-2-py3
91+
driver:
92+
image: netmanagers/salt-2019.2-py3:ubuntu-16.04
93+
- name: centos-8-2019-2-py3
94+
driver:
95+
image: netmanagers/salt-2019.2-py3:centos-8
96+
- name: centos-7-2019-2-py3
97+
driver:
98+
image: netmanagers/salt-2019.2-py3:centos-7
99+
- name: fedora-31-2019-2-py3
100+
driver:
101+
image: netmanagers/salt-2019.2-py3:fedora-31
102+
- name: opensuse-leap-151-2019-2-py3
103+
driver:
104+
image: netmanagers/salt-2019.2-py3:opensuse-leap-15.1
105+
run_command: /usr/lib/systemd/systemd
106+
# Workaround to avoid intermittent failures on `opensuse-leap-15.1`:
107+
# => SCP did not finish successfully (255): (Net::SCP::Error)
108+
transport:
109+
max_ssh_sessions: 1
110+
- name: amazonlinux-2-2019-2-py3
111+
driver:
112+
image: netmanagers/salt-2019.2-py3:amazonlinux-2
113+
- name: centos-6-2019-2-py2
114+
driver:
115+
image: netmanagers/salt-2019.2-py2:centos-6
116+
run_command: /sbin/init
117+
- name: amazonlinux-1-2019-2-py2
118+
driver:
119+
image: netmanagers/salt-2019.2-py2:amazonlinux-1
120+
run_command: /sbin/init
121+
- name: arch-base-latest-2019-2-py2
122+
driver:
123+
image: netmanagers/salt-2019.2-py2:arch-base-latest
124+
run_command: /usr/lib/systemd/systemd
16125

17126
provisioner:
18127
name: salt_solo
19-
log_level: info
128+
log_level: debug
129+
salt_install: none
20130
require_chef: false
21-
salt_install: bootstrap
22-
salt_version: latest
23-
salt_bootstrap_url: https://bootstrap.saltstack.com
24-
salt_bootstrap_options: -X -p git -p curl -p sudo
25-
26131
formula: haproxy
132+
salt_copy_filter:
133+
- .kitchen
134+
- .git
27135
dependencies:
28136
- name: hosts
29137
path: ./test/salt/salt
30138

31-
pillars_from_files:
32-
haproxy.sls: pillar.example
33-
hosts.sls: ./test/salt/pillar/hosts.sls
34-
35-
pillars:
36-
top.sls:
37-
base:
38-
"*":
39-
- hosts
40-
- haproxy
41-
42-
state_top:
43-
base:
44-
'*':
45-
- hosts
46-
- haproxy
47-
48139
verifier:
140+
# https://www.inspec.io/
49141
name: inspec
50-
reporter:
142+
sudo: true
143+
# cli, documentation, html, progress, json, json-min, json-rspec, junit
144+
reporter:
51145
- cli
52-
inspec_tests:
53-
- path: test/integration/default
54146

55147
suites:
56148
- name: default
57-
149+
excludes:
150+
- centos-6-2018-3-py2
151+
provisioner:
152+
state_top:
153+
base:
154+
'*':
155+
- hosts
156+
- haproxy
157+
pillars:
158+
top.sls:
159+
base:
160+
'*':
161+
- hosts
162+
- haproxy
163+
pillars_from_files:
164+
haproxy.sls: pillar.example
165+
hosts.sls: ./test/salt/pillar/hosts.sls
166+
verifier:
167+
inspec_tests:
168+
- path: test/integration/default
169+
- name: centos6
170+
includes:
171+
- centos-6-2018-3-py2
172+
provisioner:
173+
state_top:
174+
base:
175+
'*':
176+
- haproxy
177+
pillars:
178+
top.sls:
179+
base:
180+
'*':
181+
- haproxy
182+
pillars_from_files:
183+
haproxy.sls: test/salt/pillar/centos6.sls
184+
verifier:
185+
inspec_tests:
186+
- path: test/integration/default

.rubocop.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
# General overrides used across formulas in the org
5+
Layout/LineLength:
6+
# Increase from default of `80`
7+
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
8+
Max: 88
9+
Metrics/BlockLength:
10+
ExcludedMethods:
11+
- control
12+
- describe
13+
# Increase from default of `25`
14+
Max: 30
15+
16+
# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`

.salt-lint

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
exclude_paths: []
5+
rules: {}
6+
skip_list:
7+
# Using `salt-lint` for linting other files as well, such as Jinja macros/templates
8+
- 205 # Use ".sls" as a Salt State file extension
9+
# Skipping `207` and `208` because `210` is sufficient, at least for the time-being
10+
# I.e. Allows 3-digit unquoted codes to still be used, such as `644` and `755`
11+
- 207 # File modes should always be encapsulated in quotation marks
12+
- 208 # File modes should always contain a leading zero
13+
tags: []
14+
verbosity: 1

0 commit comments

Comments
 (0)