Add everything needed by travis-ci
This commit adds all of the config files needed for travisci
This commit is contained in:
22
.travis.yml
Normal file
22
.travis.yml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
language: ruby
|
||||||
|
rvm:
|
||||||
|
- 1.8.7
|
||||||
|
- 1.9.2
|
||||||
|
before_script:
|
||||||
|
- 'git clone git://github.com/saz/puppet-ssh spec/fixtures/modules/ssh'
|
||||||
|
- 'git clone git://github.com/puppetlabs/puppetlabs-rsync spec/fixtures/modules/rsync'
|
||||||
|
- 'git clone git://github.com/saz/puppet-memcached spec/fixtures/modules/memcached'
|
||||||
|
- 'git clone git://github.com/puppetlabs/puppetlabs-stdlib spec/fixtures/modules/stdlib'
|
||||||
|
- 'git clone git://github.com/puppetlabs/puppet-apt spec/fixtures/modules/apt'
|
||||||
|
script: "rake spec"
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
env:
|
||||||
|
- PUPPET_VERSION=2.6.12
|
||||||
|
- PUPPET_VERSION=2.7.6
|
||||||
|
- PUPPET_VERSION=2.7.11
|
||||||
|
matrix:
|
||||||
|
exclude:
|
||||||
|
- rvm: 1.9.2
|
||||||
|
env: PUPPET_VERSION=2.6.12
|
11
Gemfile
Normal file
11
Gemfile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
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'
|
||||||
|
end
|
17
Rakefile
17
Rakefile
@@ -1,14 +1,21 @@
|
|||||||
|
require 'rubygems'
|
||||||
require 'rake'
|
require 'rake'
|
||||||
|
require 'rspec/core/rake_task'
|
||||||
|
|
||||||
task :default => [:spec]
|
task :default do
|
||||||
|
system("rake -T")
|
||||||
|
end
|
||||||
|
|
||||||
desc "Run all module spec tests (Requires rspec-puppet gem)"
|
task :specs => [:spec]
|
||||||
task :spec do
|
|
||||||
system("rspec spec/**/*_spec.rb")
|
desc "Run all rspec-puppet tests"
|
||||||
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||||
|
t.rspec_opts = ['--color']
|
||||||
|
# ignores fixtures directory.
|
||||||
|
t.pattern = 'spec/{classes,defines,unit}/**/*_spec.rb'
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Build package"
|
desc "Build package"
|
||||||
task :build do
|
task :build do
|
||||||
system("puppet-module build")
|
system("puppet-module build")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
0
spec/fixtures/manifests/site.pp
vendored
Normal file
0
spec/fixtures/manifests/site.pp
vendored
Normal file
1
spec/fixtures/modules/swift
vendored
Symbolic link
1
spec/fixtures/modules/swift
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../../
|
@@ -7,5 +7,7 @@ def param_value(subject, type, title, param)
|
|||||||
end
|
end
|
||||||
|
|
||||||
RSpec.configure do |c|
|
RSpec.configure do |c|
|
||||||
c.module_path = File.join(File.dirname(__FILE__), '../../')
|
c.module_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/modules'))
|
||||||
|
# Using an empty site.pp file to avoid: https://github.com/rodjek/rspec-puppet/issues/15
|
||||||
|
c.manifest_dir = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/manifests'))
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user