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 098efba37f..8532dc4a9c 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml @@ -81,9 +81,9 @@ builders: - shell: | mkdir -p .cookbooks .bundle - bundle install --path=.bundle - bundle exec berks install --path=.cookbooks - export COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\') + ruby1.9.1 /usr/bin/bundle install --path=.bundle + ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks + COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\') if [ -z $COOKBOOK ]; then echo "Cookbook name not defined in metadata.rb" exit 1 @@ -92,12 +92,16 @@ - builder: name: chef-cookbook-lint builders: - - shell: "bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .cookbooks/$COOKBOOK" + - shell: | + COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\') + ruby1.9.1 /usr/bin/bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .cookbooks/$COOKBOOK - builder: name: chef-cookbook-rspec builders: - - shell: "bundle exec rspec .cookbooks/$COOKBOOK" + - shell: | + COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\') + ruby1.9.1 /usr/bin/bundle exec rspec .cookbooks/$COOKBOOK - builder: name: selenium