Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

0.3.2 - Release automation #5

Merged
merged 2 commits into from
Dec 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions CHANGELOG

This file was deleted.

75 changes: 75 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

[comment]: # IMPORTANT: Remember to update the links at the bottom of the file!

## [Unreleased]

## [0.3.2] Released 2017-12-28

- Add automated ``github_release`` Rake task.
- Bump puppet-blacksmith gem version and configure for signed tags.
- Reformat changelog

## [0.3.1] Released 2017-12-28

- Minor README and CONTRIBUTING documentation updates.

## [0.3.0] Released 2017-12-28

- Switch to new-style typed parameters.
- Modernize module layout and testing.
- Update supported and tested Puppet versions to 4 and 5.
- Many major puppet module dependency updates.
- Pin puppetlabs-stdlib dependency to 4.12.0, as unfortunately saz/sudo still uses the deprecated ``validate_`` functions.
- Add ``service_state`` parameter to docker class, mainly for acceptance testing
- Add ``service_ensure`` parameter to ``sddm`` class, mainly for acceptance testing
- Use puppet-strings for documentation
- Automate deployment through TravisCI

## [0.2.1] Released 2017-07-17

- Handle upstream chrony service rename to chronyd

## [0.2.0] Released 2017-07-09

- Bump saz/sudo requirement to 4.2.0+ for Arch Linux bug fix
- Remove "xorg-server-utils" package, which has been removed from repos.

## [0.1.5] Released 2016-12-05

- add management of /etc/conf.d to archlinux_workstation::docker class, as it may not already exist

## 0.1.3 Released 2016-09-01

- remove virtualbox-host-modules package in favor of virtualbox-host-dkms
- remove dkms service, as module rebuilding is now handled at install-time via alpm hooks

## 0.1.2 Released 2016-03-10

- add support for PACKAGER variable in makepkg.conf (via ``archlinux_workstation`` class variable)

## 0.1.1 Released 2015-11-25

- add support for a '-m' mail command for cronie

## 0.1.0 Released 2015-09-16

- major ground-up rewrite of module to be more reusable, and targeted at puppet4

## 0.0.1 Released 2014-03-15

- initial module creation
- migration of a bunch of stuff from https://github.com/jantman/puppet-archlinux-macbookretina

[Unreleased]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.3.2...master
[0.3.2]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.3.1...0.3.2
[0.3.1]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.3.0...0.3.1
[0.3.0]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.2.1...0.3.0
[0.2.1]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.2.0...0.2.1
[0.2.0]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.1.5...0.2.0
[0.1.5]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.1.3...0.1.5
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,17 @@ The record of someone performing the merge is the record that they performed the
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)

# Release Process

1. Ensure all changes were merged to master via PRs.
2. Ensure a [CHANGELOG.md](CHANGELOG.md) entry exists for every change.
3. Use ``bundle exec rake module:bump`` to bump the module version.
4. Update ``CHANGELOG.md`` with the new version, and ensure a link exists for the diff from the last release.
5. Commit those changes (``CHANGELOG.md`` and ``metadata.json``) and push. Wait for the TravisCI build to pass.
6. Use ``bundle exec rake github_release`` to tag the version, push that tag, and create a GitHub Release.
7. TravisCI will build the module and push to the forge, and build docs and push them to github pages.

[rspec-puppet]: http://rspec-puppet.com/
[rspec-puppet_docs]: http://rspec-puppet.com/documentation/
[beaker]: https://github.com/puppetlabs/beaker
[beaker-rspec]: https://github.com/puppetlabs/beaker-rspec

# Release Process

1. Ensure all changes were merged to master via PRs.
2. Ensure a Changelog entry exists for every change.
3. Use ``bundle exec rake module:bump_commit`` to bump the module version and commit.
4. Push that to master.
5. Use ``bundle exec rake module:tag`` to tag the version, and push that tag.
6. TravisCI will build the module and push to the forge, and build docs and push them to github pages.
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ group :system_tests do
gem "beaker-rspec", *location_for(ENV['BEAKER_RSPEC_VERSION'])
gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
gem "puppet-blacksmith", '~> 3.4', :require => false
gem "puppet-blacksmith", '>= 4.1.1', :require => false
gem 'vandamme', :require => false
gem 'octokit', "~> 4.0", :require => false
end

gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
Expand Down
47 changes: 46 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
require 'puppet-strings' if Bundler.rubygems.find_name('puppet-strings').any?
require 'vandamme' if Bundler.rubygems.find_name('vandamme').any?
require 'octokit' if Bundler.rubygems.find_name('octokit').any?
require 'json'

PuppetLint.configuration.fail_on_warnings = true
Expand Down Expand Up @@ -49,7 +51,50 @@ task :release_checks_nonparallel do
Rake::Task["check:git_ignore"].invoke
end

require 'puppet-strings'
if Bundler.rubygems.find_name('puppet-blacksmith').any? && Bundler.rubygems.find_name('vandamme').any?
bsmith = Blacksmith::RakeTask.new do |t|
t.tag_message_pattern = "Version %s" # Signed tags must have a message
t.tag_sign = true # enable GPG signing
end

desc 'Tag git (signed), push tag, interactively verify changelog, create GitHub Release'
task :github_release do
fail('ERROR: you must export GITHUB_TOKEN env var') unless ENV.include?('GITHUB_TOKEN')
client = Octokit::Client.new(access_token: ENV['GITHUB_TOKEN'])
# ensure we have valid auth
client.user
# get the module version
mod = Blacksmith::Modulefile.new
modver = mod.version
modtag = "v#{modver}"
# make sure we don't already have a release for it
client.releases('jantman/puppet-archlinux-workstation').each do |r|
abort("ERROR: GitHub Release already exists for tag #{modtag}") if modtag == r.tag_name
end
puts "Module version: #{modver}"
chglog = Vandamme::Parser.new(
changelog: File.read('CHANGELOG.md'),
version_header_exp: /## \[(\d+\.\d+\.\d+)\] Released (\d{4}-\d{2}-\d{2})/,
format: 'markdown'
).parse
fail("ERROR: no CHANGELOG.md entry for version #{modver}") unless chglog.has_key?(modver)
puts "Changelog for #{modver}:\n\n#{chglog[modver]}\n\n"
print "Does this look correct? [y|N] "
abort('Aborted! Exiting.') unless STDIN.gets.strip == 'y'
puts "Tagging..."
Rake::Task["module:tag"].invoke
puts "Pushing git with tags..."
bsmith.git.push!
puts "Creating GitHub Release..."
rel = client.create_release(
'jantman/puppet-archlinux-workstation',
modtag,
name: modver,
body: chglog[modver]
)
puts "Created release: #{rel.html_url}"
end
end

if Bundler.rubygems.find_name('puppet-strings').any?
# Reimplement puppet-strings "strings:generate" task with custom params
Expand Down
7 changes: 4 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jantman-archlinux_workstation",
"version": "0.3.1",
"version": "0.3.2",
"summary": "Configure an Arch Linux workstation/desktop/laptop",
"author": "jantman",
"description": "Provides many classes (and a sane default class/init.pp) for configuring an Arch Linux workstation/laptop/desktop for graphical use.",
Expand Down Expand Up @@ -40,7 +40,7 @@
],
"operatingsystem_support": [
{
"operatingsystem": "ArchLinux"
"operatingsystem": "ArchLinux"
}
],
"requirements": [
Expand All @@ -49,7 +49,8 @@
"version_requirement": ">= 4.0.0 < 6.0.0"
}
],
"checksums": {},
"checksums": {
},
"source": "https://github.com/jantman/puppet-archlinux-workstation",
"project_page": "https://github.com/jantman/puppet-archlinux-workstation",
"license": "GPL-3.0"
Expand Down