Merge "Fix Chef cookbook-related strainer issue"

This commit is contained in:
Jenkins 2014-06-04 14:49:42 +00:00 committed by Gerrit Code Review
commit b5c62380f8
2 changed files with 6 additions and 5 deletions

View File

@ -20,6 +20,7 @@
- revoke-sudo
- gerrit-git-prep
- chef-bundler-prep
- chef-berkshelf-prep
- chef-cookbook-foodcritic
publishers:
@ -33,6 +34,7 @@
- revoke-sudo
- gerrit-git-prep
- chef-bundler-prep
- chef-berkshelf-prep
- chef-cookbook-rubocop
publishers:

View File

@ -140,11 +140,10 @@
name: chef-cookbook-rubocop
builders:
- shell: |
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
if grep rubocop: Strainerfile; then
ruby1.9.1 /usr/bin/bundle exec strainer test -o rubocop
ruby1.9.1 /usr/bin/bundle exec strainer test --cookbooks-path=.cookbooks --only=rubocop
else
ruby1.9.1 /usr/bin/bundle exec ruby1.9.1 /usr/bin/bundle exec rubocop
ruby1.9.1 /usr/bin/bundle exec rubocop
fi
- builder:
@ -152,7 +151,7 @@
builders:
- shell: |
if grep foodcritic: Strainerfile; then
ruby1.9.1 /usr/bin/bundle exec strainer test -o foodcritic
ruby1.9.1 /usr/bin/bundle exec strainer test --cookbooks-path=.cookbooks --only=foodcritic
else
ruby1.9.1 /usr/bin/bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .
fi
@ -163,7 +162,7 @@
- shell: |
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
if grep chefspec: Strainerfile; then
ruby1.9.1 /usr/bin/bundle exec strainer test -o chefspec
ruby1.9.1 /usr/bin/bundle exec strainer test --cookbooks-path=.cookbooks --only=chefspec
else
ruby1.9.1 /usr/bin/bundle exec rspec .cookbooks/$COOKBOOK/spec
fi