Skip to content

Commit

Permalink
Prep for Travis push releases
Browse files Browse the repository at this point in the history
  • Loading branch information
juniorsysadmin committed Jun 22, 2015
1 parent e36c208 commit 833b978
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
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
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
@@ -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

0 comments on commit 833b978

Please sign in to comment.