
It seems the latest 2.2.12 requires rake>13.0 installed and that requirement doesn't work well in current our CI jobs. Let's pin it to the previous version until we resolve the issue Note that this change only covers library jobs and we also need the same fix for puppet-openstack-integration later. This change also removes the pin for the very old Ruby version. Closes-Bug: #1917457 Change-Id: Ibafcb3b994db361df3427ca2afe4dd3d08028add
35 lines
1.1 KiB
Bash
35 lines
1.1 KiB
Bash
#!/bin/bash
|
|
#
|
|
# functions - puppet-openstack_spec_helper specific functions
|
|
#
|
|
|
|
install_gems() {
|
|
mkdir .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
export GEM_BIN_DIR=$GEM_HOME/bin
|
|
|
|
# use puppet-nova to test the gem
|
|
if [ -d /home/zuul/src/opendev.org/openstack/puppet-nova ]; then
|
|
[ ! -d openstack ] && mkdir openstack
|
|
cp -R /home/zuul/src/opendev.org/openstack/puppet-nova openstack/puppet-nova
|
|
else
|
|
git clone https://opendev.org/openstack/puppet-nova openstack/puppet-nova
|
|
fi
|
|
cd openstack/puppet-nova
|
|
|
|
# Modify Gemfile to use local library and not the one on git
|
|
# so we can actually test the current state of the gem.
|
|
sed -i -e "s|\('puppet-openstack_spec_helper',.*\) \(:git\).*|\1 :path => '../..'|g" Gemfile
|
|
# NOTE(aschultz): in order for this to work we need to nuke the branch line
|
|
# since we're replacing the repository with a path
|
|
sed -i "/.*(ref|branch)[[:space:]]*=> 'stable\/.*/d" Gemfile
|
|
|
|
# Install dependencies
|
|
ruby <<EOF
|
|
cmd = 'gem install bundler --no-document --verbose --bindir=${GEM_BIN_DIR}'
|
|
cmd += ' -v 2.2.11'
|
|
system(cmd)
|
|
EOF
|
|
$GEM_HOME/bin/bundle install
|
|
}
|