Skip to content

Commit 52569d8

Browse files
authored
Merge pull request #44 from daks/semantic-release
Semantic release
2 parents f99e3b7 + 21a1866 commit 52569d8

18 files changed

+773
-156
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ coverage.xml
4747
.hypothesis/
4848
.kitchen
4949
.kitchen.local.yml
50+
kitchen.local.yml
5051

5152
# Translations
5253
*.mo
@@ -101,3 +102,12 @@ ENV/
101102

102103
# mypy
103104
.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?

.kitchen.docker.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.kitchen.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.travis.yml

Lines changed: 75 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,88 @@
1+
stages:
2+
- test
3+
- commitlint
4+
- name: release
5+
if: branch = master AND type != pull_request
6+
17
sudo: required
28
cache: bundler
39
language: ruby
410

511
services:
612
- docker
713

8-
before_install:
9-
- bundle install
10-
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
1127
env:
1228
matrix:
13-
- INSTANCE: default-debian-9
14-
- INSTANCE: default-ubuntu-1804
15-
- INSTANCE: default-fedora-27
16-
- INSTANCE: default-centos-7
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
1753

1854
script:
1955
- bundle exec kitchen verify ${INSTANCE}
2056

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

FORMULA

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: logrotate
2+
os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE
3+
os_family: Debian, RedHat, Suse
4+
version: 1.0.0rc
5+
release: 1
6+
minimum_version: 2016.11
7+
summary: logrotate formula
8+
description: Formula to setup logrotate
9+
top_level_dir: logrotate

Gemfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
# frozen_string_literal: true
2-
31
source "https://rubygems.org"
42

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

README.rst

Lines changed: 0 additions & 41 deletions
This file was deleted.

bin/kitchen

Lines changed: 29 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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)