Skip to content

Commit 43923a4

Browse files
Merge pull request #12 from noelmcloughlin/template-formula
refactor(formula): align with template-formula v3.0.0
2 parents b94b7e1 + ee6f30f commit 43923a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2066
-191
lines changed

.gitignore

+112-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,113 @@
1-
.idea
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
25

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+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
60+
# Flask stuff:
61+
instance/
62+
.webassets-cache
63+
64+
# Scrapy stuff:
65+
.scrapy
66+
67+
# Sphinx documentation
68+
docs/_build/
69+
70+
# PyBuilder
71+
target/
72+
73+
# Jupyter Notebook
74+
.ipynb_checkpoints
75+
76+
# pyenv
77+
.python-version
78+
79+
# celery beat schedule file
80+
celerybeat-schedule
81+
82+
# SageMath parsed files
83+
*.sage.py
84+
85+
# dotenv
86+
.env
87+
88+
# virtualenv
89+
.venv
90+
venv/
91+
ENV/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/
105+
106+
# Bundler
107+
Gemfile.lock
108+
109+
# copied `.md` files used for conversion to `.rst` using `m2r`
110+
docs/*.md
111+
112+
# Vim
113+
*.sw?

.travis.yml

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
stages:
2+
- test
3+
- commitlint
4+
- name: release
5+
if: branch = master AND type != pull_request
6+
7+
sudo: required
8+
cache: bundler
9+
language: ruby
10+
11+
services:
12+
- docker
13+
14+
# Make sure the instances listed below match up with
15+
# the `platforms` defined in `kitchen.yml`
16+
# NOTE: Please try to select up to six instances that add some meaningful
17+
# testing of the formula's behaviour. If possible, try to refrain from
18+
# the classical "chosing all the instances because I want to test on
19+
# another/all distro/s" trap: it will just add time to the testing (see
20+
# the discussion on #121). As an example, the set chosen below covers
21+
# the most used distros families, systemd and non-systemd and the latest
22+
# three supported Saltstack versions with python2 and 3."
23+
# As for `kitchen.yml`, that should still contain all of the platforms,
24+
# to allow for comprehensive local testing
25+
# Ref: https://github.com/saltstack-formulas/template-formula/issues/118
26+
# Ref: https://github.com/saltstack-formulas/template-formula/issues/121
27+
env:
28+
matrix:
29+
- INSTANCE: default-debian-9-develop-py3
30+
# - INSTANCE: default-ubuntu-1804-develop-py3
31+
# - INSTANCE: default-centos-7-develop-py3
32+
# - INSTANCE: default-fedora-29-develop-py3
33+
# - INSTANCE: default-opensuse-leap-15-develop-py3
34+
# - INSTANCE: default-debian-9-2019-2-py3
35+
- INSTANCE: default-ubuntu-1804-2019-2-py3
36+
- INSTANCE: default-centos-7-2019-2-py3
37+
# - INSTANCE: default-fedora-29-2019-2-py3
38+
# - INSTANCE: default-opensuse-leap-15-2019-2-py3
39+
# - INSTANCE: default-debian-9-2018-3-py2
40+
# - INSTANCE: default-ubuntu-1604-2018-3-py2
41+
# - INSTANCE: default-centos-7-2018-3-py2
42+
- INSTANCE: default-fedora-29-2018-3-py2
43+
# TODO: Use this when fixed instead of `opensuse-leap-42`
44+
# Ref: https://github.com/netmanagers/salt-image-builder/issues/2
45+
# - INSTANCE: default-opensuse-leap-15-2018-3-py2
46+
- INSTANCE: default-opensuse-leap-42-2018-3-py2
47+
# - INSTANCE: default-debian-8-2017-7-py2
48+
# - INSTANCE: default-ubuntu-1604-2017-7-py2
49+
# TODO: Enable after improving the formula to work with other than `systemd`
50+
- INSTANCE: default-centos-6-2017-7-py2
51+
# - INSTANCE: default-fedora-28-2017-7-py2
52+
# - INSTANCE: default-opensuse-leap-42-2017-7-py2
53+
54+
script:
55+
- bundle exec kitchen verify ${INSTANCE}
56+
57+
jobs:
58+
include:
59+
# Define the commitlint stage
60+
- stage: commitlint
61+
language: node_js
62+
node_js: lts/*
63+
before_install: skip
64+
script:
65+
- npm install @commitlint/config-conventional -D
66+
- npm install @commitlint/travis-cli -D
67+
- commitlint-travis
68+
# Define the release stage that runs semantic-release
69+
- stage: release
70+
language: node_js
71+
node_js: lts/*
72+
before_install: skip
73+
script:
74+
# Update `AUTHORS.md`
75+
- export MAINTAINER_TOKEN=${GH_TOKEN}
76+
- go get github.com/myii/maintainer
77+
- maintainer contributor
78+
79+
# Install all dependencies required for `semantic-release`
80+
- npm install @semantic-release/changelog@3 -D
81+
- npm install @semantic-release/exec@3 -D
82+
- npm install @semantic-release/git@7 -D
83+
deploy:
84+
provider: script
85+
skip_cleanup: true
86+
script:
87+
# Run `semantic-release`
88+
- npx semantic-release@15

AUTHORS.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Authors
2+
3+
This list is sorted by the number of commits per contributor in _descending_ order.
4+
5+
Avatar|Contributor|Contributions
6+
:-:|---|:-:
7+
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/13322818?v=4' width='36' height='36' alt='@noelmcloughlin'>|[@noelmcloughlin](https://github.com/noelmcloughlin)|2
8+
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1920805?v=4' width='36' height='36' alt='@alxwr'>|[@alxwr](https://github.com/alxwr)|1
9+
10+
---
11+
12+
Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2019-06-05.

CHANGELOG.md

Whitespace-only changes.

FORMULA

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: sysstat
2+
os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, Solaris, SmartOS
3+
os_family: Debian, RedHat, Suse, Gentoo, Arch, Alpine, FreeBSD, OpenBSD, Solaris
4+
version: 1.0.0
5+
release: 1
6+
minimum_version: 2016.11
7+
summary: sysstat formula
8+
description: Formula to install sysstat/sar and configure it.
9+
top_level_dir: sysstat

Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source "https://rubygems.org"
2+
3+
gem 'kitchen-docker', '>= 2.9'
4+
gem 'kitchen-salt', '>= 0.6.0'
5+
gem 'kitchen-inspec', '>= 1.1'
6+

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2015 Salt Stack Formulas
1+
Copyright (c) 2019 Salt Stack Formulas
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

README.rst

-94
This file was deleted.

bin/kitchen

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'kitchen' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
14+
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
16+
17+
if File.file?(bundle_binstub)
18+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19+
load(bundle_binstub)
20+
else
21+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23+
end
24+
end
25+
26+
require "rubygems"
27+
require "bundler/setup"
28+
29+
load Gem.bin_path("test-kitchen", "kitchen")

commitlint.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
};

0 commit comments

Comments
 (0)