Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add files for travis CI #17

Merged
merged 1 commit into from

3 participants

@branan
Owner

Add all the files needed for running Travis CI on the rabbitmq module

Gemfile
@@ -0,0 +1,15 @@
+source :rubygems
+
+puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
+
+gem 'puppet', puppetversion
+gem 'hiera', '>= 0.3.0'
@nanliu
nanliu added a note

No hiera unless required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Rakefile
@@ -0,0 +1,15 @@
+require 'rake'
+require 'puppet-lint/tasks/puppet-lint'
+
+task :default => [:spec]
+
+desc "Run all module spec tests (Requires rspec-puppet gem)"
+task :spec do
+ system("rspec spec/**/*_spec.rb")
@nanliu
nanliu added a note

See staging Rakefile for example.

t.pattern = 'spec/{classes,defines,unit}/*/_spec.rb'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@bodepd bodepd merged commit 358db16 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 8, 2012
  1. @branan
This page is out of date. Refresh to see the latest.
Showing with 58 additions and 0 deletions.
  1. +16 −0 .travis.yml
  2. +13 −0 Gemfile
  3. +29 −0 Rakefile
View
16 .travis.yml
@@ -0,0 +1,16 @@
+language: ruby
+rvm:
+ - 1.8.7
+before_script:
+ - "git clone git://github.com/puppetlabs/puppetlabs-stdlib.git spec/fixtures/modules/stdlib && git clone git://github.com/puppetlabs/puppet-apt.git spec/fixtures/modules/apt"
+after_script:
+script: "rake spec"
+branches:
+ only:
+ - master
+env:
+ - PUPPET_VERSION=2.7.13
+ - PUPPET_VERSION=2.7.6
+ - PUPPET_VERSION=2.6.9
+notifications:
+ email: false
View
13 Gemfile
@@ -0,0 +1,13 @@
+source :rubygems
+
+puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
+
+gem 'puppet', puppetversion
+
+group :test do
+ gem 'rake', '>= 0.9.0'
+ gem 'rspec', '>= 2.8.0'
+ gem 'rspec-puppet', '>= 0.1.1'
+ gem 'mocha', '>= 0.11.0'
+ gem 'puppet-lint', '>= 0.1.0'
+end
View
29 Rakefile
@@ -0,0 +1,29 @@
+require 'rake'
+require 'rspec/core/rake_task'
+
+task :default => [:spec]
+
+desc "Run all module spec tests (Requires rspec-puppet gem)"
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.rspec_opts = ['--color']
+ t.pattern = 'spec/{classes,defines,unit}/**/*_spec.rb'
+end
+
+desc "Build puppet module package"
+task :build do
+ # This will be deprecated once puppet-module is a face.
+ begin
+ Gem::Specification.find_by_name('puppet-module')
+ rescue Gem::LoadError, NoMethodError
+ require 'puppet/face'
+ pmod = Puppet::Face['module', :current]
+ pmod.build('./')
+ end
+end
+
+desc "Check puppet manifests with puppet-lint"
+task :lint do
+ # This requires pull request: https://github.com/rodjek/puppet-lint/pull/81
+ system("puppet-lint manifests")
+ system("puppet-lint tests")
+end
Something went wrong with that request. Please try again.