From 0017b393da9fc52b5545acbffca9af648a0cb6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Gagne=CC=81?= Date: Tue, 25 Mar 2014 12:23:23 -0400 Subject: [PATCH] Add ability to use Bundler to run puppet-lint If Gemfile exists, use Bundler to install dependencies and run puppet-lint check. If Gemfile is missing, fallback to previous behavior which is to use system packages instead. Change-Id: I6dbb9a6977b568a71225f9cbc7d5715f6deab7cd --- .../files/jenkins_job_builder/config/macros.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml index 2c66a282ee..24af813f9d 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml @@ -85,7 +85,14 @@ cd "$MODULE" fi fi - rake lint 2>&1 + if [ -f Gemfile ]; then + mkdir .bundled_gems + export GEM_HOME=`pwd`/.bundled_gems + bundle install + bundle exec rake lint 2>&1 + else + rake lint 2>&1 + fi - builder: name: puppet-syntax