Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update travis to test syntax validation and lint. #24

Merged
merged 1 commit into from
Sep 22, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
---
env:
- PUPPET_VERSION=2.7.13
- PUPPET_VERSION=3.2.1
- PUPPET_VERSION=2.7.22
- PUPPET_VERSION=3.2.4
notifications:
email: false
global:
- PUBLISHER_LOGIN=ghoneycutt
- secure: |-
fSNt35EMHQ0nqBnvut1DP5jOqzYHLCUq83miWD//qShKwfCaeRREcl22uZBQ
AqNPtoR7qW1dGZgFQjnEiY6Cx969S0imGswdAoIgbblkiyJHvqNHAidRSUGG
wsb82BNaH4XAk09v5HYiAYOkOEj8LidFZMLe683s1XFeVT1pcMo=
rvm:
- 1.9.3
- 1.8.7
matrix:
allow_failures:
- env: PUPPET_VERSION=2.7.13
- env: PUPPET_VERSION=2.7.22
language: ruby
before_script: gem install --no-ri --no-rdoc bundler
script:
- rake spec
gemfile: .gemfile
before_script: "gem install --no-ri --no-rdoc bundler"
script: 'bundle exec rake validate && bundle exec rake lint && SPEC_OPTS="--format documentation" bundle exec rake spec'
gemfile: Gemfile
5 changes: 1 addition & 4 deletions .gemfile → Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
source :rubygems
source "https://rubygems.org"

puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
gem 'rake'
gem 'puppet', puppetversion
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-lint', '>= 0.3.2'
gem 'rspec-puppet'
gem 'facter', '>= 1.7.0', "< 1.8.0"

9 changes: 9 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

desc "Run puppet in noop mode and check for syntax errors."
task :validate do
Dir['manifests/**/*.pp'].each do |path|
sh "puppet parser validate --noop #{path}"
end
end