ZhongShengping b352aef9c8 Move to opendev
Change-Id: I6837753871efaa298704de53c9c4752d427fe5b4
2019-04-21 14:34:23 +08:00

24 lines
578 B
Bash

#!/bin/bash
#
# functions - puppet-openstack_spec_helper specific functions
#
prepare_environment() {
rm -rf puppet-whazz default-config.yaml
mkdir -p .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
ruby <<EOF
cmd = 'gem install bundler --no-rdoc --no-ri --verbose'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
cmd += ' -v 1.17.3'
end
system(cmd)
EOF
# Build fake module
OS_NEW_MODULE_TEST=yes bash -x ./contrib/bootstrap.sh whazz dummy
cd puppet-whazz/x/puppet-modulesync-configs/modules/puppet-whazz
$GEM_HOME/bin/bundle install
}