Skip to content

Commit 292c343

Browse files
authored
Merge pull request #80 from myii/chore/standardise-structure
feat(semantic-release): implement for this formula
2 parents 54b5719 + 4934355 commit 292c343

22 files changed

+981
-166
lines changed

.gitignore

Lines changed: 121 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,122 @@
1-
.kitchen/*
2-
*.swp
3-
*.swo
4-
*~
5-
.bundle
6-
vendor
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
7108
Gemfile.lock
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: 0 additions & 57 deletions
This file was deleted.

.travis.yml

Lines changed: 74 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,86 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
dist: bionic
5+
stages:
6+
- test
7+
- lint
8+
- name: release
9+
if: branch = master AND type != pull_request
10+
111
sudo: required
212
cache: bundler
313
language: ruby
414

515
services:
616
- docker
717

8-
before_install:
9-
- bundle install
10-
18+
# Make sure the instances listed below match up with
19+
# the `platforms` defined in `kitchen.yml`
1120
env:
1221
matrix:
13-
- INSTANCE: default-debian-9
14-
- INSTANCE: default-ubuntu-1804
15-
- INSTANCE: default-centos-7
22+
- INSTANCE: default-debian-10-develop-py3
23+
# - INSTANCE: default-ubuntu-1804-develop-py3
24+
# - INSTANCE: default-centos-7-develop-py3
25+
# - INSTANCE: default-fedora-30-develop-py3
26+
# - INSTANCE: default-opensuse-leap-15-develop-py3
27+
# - INSTANCE: default-amazonlinux-2-develop-py2
28+
# - INSTANCE: default-debian-9-2019-2-py3
29+
# - INSTANCE: default-ubuntu-1804-2019-2-py3
30+
- INSTANCE: default-centos-7-2019-2-py3
31+
- INSTANCE: default-fedora-30-2019-2-py3
32+
# - INSTANCE: default-opensuse-leap-15-2019-2-py3
33+
# - INSTANCE: default-amazonlinux-2-2019-2-py2
34+
- INSTANCE: default-debian-9-2018-3-py2
35+
- INSTANCE: default-ubuntu-1604-2018-3-py2
36+
# - INSTANCE: default-centos-7-2018-3-py2
37+
# - INSTANCE: default-fedora-29-2018-3-py2
38+
# - INSTANCE: default-opensuse-leap-15-2018-3-py2
39+
# - INSTANCE: default-amazonlinux-2-2018-3-py2
40+
# - INSTANCE: default-debian-8-2017-7-py2
41+
# - INSTANCE: default-ubuntu-1604-2017-7-py2
42+
- INSTANCE: default-centos-6-2017-7-py2
43+
# - INSTANCE: default-fedora-29-2017-7-py2
44+
# - INSTANCE: default-opensuse-leap-15-2017-7-py2
45+
# - INSTANCE: default-amazonlinux-2-2017-7-py2
1646

1747
script:
18-
- bundle exec kitchen verify ${INSTANCE}
48+
- bin/kitchen verify ${INSTANCE}
49+
50+
jobs:
51+
include:
52+
# Define the `lint` stage (runs `yamllint` and `commitlint`)
53+
- stage: lint
54+
language: node_js
55+
node_js: lts/*
56+
before_install: skip
57+
script:
58+
# Install and run `yamllint`
59+
# Need at least `v1.17.0` for the `yaml-files` setting
60+
- pip install --user yamllint>=1.17.0
61+
- yamllint -s .
62+
# Install and run `commitlint`
63+
- npm install @commitlint/config-conventional -D
64+
- npm install @commitlint/travis-cli -D
65+
- commitlint-travis
66+
# Define the release stage that runs `semantic-release`
67+
- stage: release
68+
language: node_js
69+
node_js: lts/*
70+
before_install: skip
71+
script:
72+
# Update `AUTHORS.md`
73+
- export MAINTAINER_TOKEN=${GH_TOKEN}
74+
- go get github.com/myii/maintainer
75+
- maintainer contributor
1976

77+
# Install all dependencies required for `semantic-release`
78+
- npm install @semantic-release/changelog@3 -D
79+
- npm install @semantic-release/exec@3 -D
80+
- npm install @semantic-release/git@7 -D
81+
deploy:
82+
provider: script
83+
skip_cleanup: true
84+
script:
85+
# Run `semantic-release`
86+
- npx semantic-release@15

.yamllint

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
# Extend the `default` configuration provided by `yamllint`
5+
extends: default
6+
7+
# Files to ignore completely
8+
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
9+
# 2. Any SLS files under directory `test/`, which are actually state files
10+
ignore: |
11+
node_modules/
12+
test/**/states/**/*.sls
13+
14+
yaml-files:
15+
# Default settings
16+
- '*.yaml'
17+
- '*.yml'
18+
- .yamllint
19+
# SaltStack Formulas additional settings
20+
- '*.example'
21+
- test/**/*.sls
22+
23+
rules:
24+
empty-values:
25+
forbid-in-block-mappings: true
26+
forbid-in-flow-mappings: true
27+
line-length:
28+
# Increase from default of `80`
29+
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
30+
max: 88

FORMULA

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: redis
2+
os: Debian, Ubuntu, RedHat, Fedora, CentOS
3+
os_family: Debian, RedHat
4+
version: 0.25.2
5+
release: 1
6+
minimum_version: 2017.7
7+
summary: template formula
8+
description: Formula to install and configure Redis
9+
top_level_dir: redis

Gemfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
source "https://rubygems.org"
22

3-
gem "docker"
4-
gem "inspec"
5-
gem "test-kitchen"
6-
gem "kitchen-docker"
7-
gem "kitchen-salt"
8-
gem "kitchen-inspec"
3+
gem 'kitchen-docker', '>= 2.9'
4+
gem 'kitchen-salt', '>= 0.6.0'
5+
gem 'kitchen-inspec', '>= 1.1'
96

0 commit comments

Comments
 (0)