Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep for Travis push releases #148

Merged
merged 1 commit into from
Jun 22, 2015
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
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,15 @@ matrix:
env: PUPPET_GEM_VERSION="~> 3.0" STRICT_VARIABLES="yes"
notifications:
email: false

deploy:
provider: puppetforge
user: puppet
password:
secure: "SCQpiBB9qpZAjBRk+b9D3cSCQfYpDgHPOdOc7djfGeB5yn1UbGg7uW1zshrshb4QMLfUgvsL4LsT0CYj7ilBerghgeySF5JWuZdk05W/7Iudls4btbxdVjqtALR7p02mnk40qHTR1Tdb/j0gXW9uigU6nQU9iCP+Poa1KF6PXpk="
on:
tags: true
# all_branches are required to use tags
all_branches: true
# Only publish if our main Ruby target builds
rvm: 2.1.5
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ group :development, :unit_tests do
gem 'simplecov', :require => false
gem 'puppet_facts', :require => false
gem 'json', :require => false
gem "puppet-blacksmith", "> 3.3.0", { "platforms" => ["ruby_19", "ruby_20", "ruby_21"] }
end

group :system_tests do
Expand Down
27 changes: 27 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'

begin
require 'puppet_blacksmith/rake_tasks'
rescue LoadError
end

PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

if RUBY_VERSION >= "1.9.0" then
Blacksmith::RakeTask.new do |t|
t.build = false # do not build the module nor push it to the Forge
# just do the tagging [:clean, :tag, :bump_commit]
end


desc "Offload release process to Travis."
task :travis_release => [
:check_changelog, # check that the changelog contains an entry for the current release
:"module:release", # do everything except build / push to forge, travis will do that for us
]

desc "Check Changelog."
task :check_changelog do
v = Blacksmith::Modulefile.new.version
if File.readlines('CHANGELOG.md').grep("Release #{v}").size == 0 then
fail "Unable to find a CHANGELOG.md entry for the #{v} release."
end
end
end