puppet-openstack-integration/playbooks/run-syntax-tests.yaml
Takashi Kajinami 0be086fef5 Explicitly set --bindir when isntalling bundle
... so that we can make sure that bundle command is installed in
GEM_HOME/bin directory.

Change-Id: I1ea78bbd2b7fe22d510e10b0c96c0ed7bdc9f8a3
Closes-Bug: #1866176
2020-03-10 06:09:34 +00:00

20 lines
709 B
YAML

- hosts: all
tasks:
- shell:
cmd: |
export PUPPET_GEM_VERSION='~> {{ puppet }}'
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
export GEM_BIN_DIR=$GEM_HOME/bin
ruby <<EOF
cmd = 'gem install bundler --no-rdoc --no-ri --verbose --no-user-install --bindir=${GEM_BIN_DIR}'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
cmd += ' -v 1.17.3'
end
system(cmd)
EOF
$GEM_BIN_DIR/bundle install --retry 3
$GEM_BIN_DIR/bundle exec rake syntax
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'