Add travis.ci for testing multiple puppet versions.

The existing spec tests should be tested on multiple puppet version. The
addition of travis.ci allows us to easily verify all specs are passing
and new manifests did not break backwards compatibility by introducing
new syntax.
This commit is contained in:
Nan Liu 2012-03-16 23:11:55 -05:00
parent b9e6a78816
commit 33c72efde1
2 changed files with 35 additions and 0 deletions

22
.travis.yml Normal file
View file

@ -0,0 +1,22 @@
language: ruby
rvm:
- 1.8.7
- 1.9.2
- ree
before_script:
- "[ '2.6.12' = $PUPPET_VERSION ] && git clone git://github.com/puppetlabs/puppetlabs-create_resources.git spec/fixtures/modules/create_resources"
after_script:
script: "rake spec"
branches:
only:
- tb/travis
env:
- PUPPET_VERSION=2.6.12
- PUPPET_VERSION=2.7.6
- PUPPET_VERSION=2.7.9
matrix:
exclude:
- rvm: 1.9.2
env: PUPPET_VERSION=2.6.12
notifications:
email: false

13
Gemfile Normal file
View file

@ -0,0 +1,13 @@
source :rubygems
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
gem 'puppet', puppetversion
gem 'hiera', '>= 0.3.0'
gem 'hiera-puppet', '>= 0.3.0'
group :test do
gem 'rake', '>= 0.9.0'
gem 'rspec', '>= 2.8.0'
gem 'rspec-puppet', '>= 0.1.1'
end