Fix branch cleanup for p-o-i Gemfile It seems that it attempts to remove the branch line where the reality is that it should remove the one with ref as that is what was used since Ocata and beyond. Change-Id: I992b351c72487bc18732bf32a761a5a7d3f4b63b (cherry picked from commit8e3c28ec0d) Simplify sed command for replacing with zuul-clone Update sed to properly match Gemfiles, this was not working correctly. Change-Id: Idb440e750ae147ec7a1262ec9576c557fad858b3 Signed-off-by: Paul Belanger <pabelanger@redhat.com> (cherry picked from commit625511bbfe)
30 lines
1008 B
Bash
30 lines
1008 B
Bash
#!/bin/bash
|
|
#
|
|
# functions - puppet-openstack_spec_helper specific functions
|
|
#
|
|
|
|
install_gems() {
|
|
mkdir .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
|
|
# use puppet-nova to test the gem
|
|
if [ -e /usr/zuul-env/bin/zuul-cloner ] ; then
|
|
/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
|
|
git://git.openstack.org openstack/puppet-nova
|
|
else
|
|
git clone git://git.openstack.org/openstack/puppet-nova -b stable/newton 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[[:space:]]*=> 'stable\/.*/d" Gemfile
|
|
|
|
# Install dependencies
|
|
gem install bundler --no-rdoc --no-ri --verbose
|
|
$GEM_HOME/bin/bundle install
|
|
}
|