Skip to content

Commit

Permalink
(maint) Add Travis CI support to active branches
Browse files Browse the repository at this point in the history
Without this patch all active branches do not have proper Travis configuration
files.  This is a problem because Travis will exercise any branch pushed to the
puppetlabs organization repository on Github.  The default behavior is to email
notifications which is undesirable.

To address this problem Travis configuration settings are added to an active
branch.

Active branches are those that have recent activity when compared against the
following command:

    for k in `git branch -r |grep origin/|perl -pe s/^..//`
    do
      echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k|head -n 1`\\t$k;
    done | sort -r | grep origin

Which should produce output like:

    2013-01-06 02:10:28 -0800 14 hours ago  origin/master
    2013-01-02 16:59:15 -0800 4 days ago    origin/3.0.x
    2012-12-18 10:36:18 -0800 3 weeks ago   origin/2.7.x
    2012-07-09 15:34:04 -0700 6 months ago  origin/2.6.x
    2011-11-03 15:02:03 -0700 1 year, 2 months ago  origin/0.24.x
    2011-10-21 23:15:37 -0700 1 year, 3 months ago  origin/0.25.x
  • Loading branch information
Jeff McCune committed Jan 7, 2013
1 parent 08e45ed commit 0350afd
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 51 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ tags
# Now that there is a gemfile, RVM ignores rvmrc in parent directories, so a local one is required
# to work around that. Which we don't want committed, so we can ignore it here.
/.rvmrc
.bundle/
ext/packaging/
pkg/
vendor/
Gemfile.lock
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: ruby
bundler_args: --without development
script: "bundle exec rake spec SPEC_OPTS='--color --format documentation'"
notifications:
email: false
rvm:
- 1.8.7
- 1.9.3
matrix:
allow_failures:
- rvm: 1.9.3
28 changes: 22 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
source :rubygems

gemspec
def location_for(place)
if place =~ /^(git:[^#]*)#(.*)/
[{ :git => $1, :branch => $2, :require => false }]
elsif place =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
else
[place, { :require => false }]
end
end

group(:development, :test) do
gem "facter", "~> 1.6.4", :require => false
gem "rack", "~> 1.4.1", :require => false
gem "rspec", "~> 2.10.0", :require => false
gem "puppet", *location_for('file://.')
gem "facter", *location_for(ENV['FACTER_LOCATION'] || '~> 1.6')
gem "hiera", *location_for(ENV['HIERA_LOCATION'] || '~> 1.0')
gem "rack", "~> 1.4", :require => false
gem "rake", :require => false
gem "rspec", "~> 2.11.0", :require => false
gem "mocha", "~> 0.10.5", :require => false
gem "activerecord", *location_for('~> 3.0.7')
gem "couchrest", *location_for('~> 1.0')
gem "net-ssh", *location_for('~> 2.1')
gem "puppetlabs_spec_helper"
gem "sqlite3"
gem "stomp"
gem "tzinfo"
end

platforms :mswin, :mingw do
# See http://jenkins.puppetlabs.com/ for current Gem listings for the Windows
# CI Jobs.
gem "sys-admin", "~> 1.5.6", :require => false
gem "win32-api", "~> 1.4.8", :require => false
gem "win32-dir", "~> 0.3.7", :require => false
Expand Down
44 changes: 0 additions & 44 deletions Gemfile.lock

This file was deleted.

9 changes: 8 additions & 1 deletion puppet.gemspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# -*- encoding: utf-8 -*-

require File.expand_path("../lib/puppet/version", __FILE__)

Gem::Specification.new do |s|
s.name = "puppet"
s.version = "2.7.19"
version = Puppet.version
if mdata = version.match(/(\d+\.\d+\.\d+)/)
s.version = mdata[1]
else
s.version = version
end

s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["Puppet Labs"]
Expand Down

0 comments on commit 0350afd

Please sign in to comment.