X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fpackaging%2Ftest-puppet.sh;h=c0aace6c093093924284526ffd4c167e76d613de;hb=3b7ee333f1b20d16cbd2c00445cc28c10de2857e;hp=492e7d93410e37965a75fa9fa10b4334c4c3c6fb;hpb=ad55d5440b3f444c7a2d202d65765eb1aa1e5323;p=releng%2Fbuilder.git diff --git a/jjb/packaging/test-puppet.sh b/jjb/packaging/test-puppet.sh index 492e7d934..c0aace6c0 100644 --- a/jjb/packaging/test-puppet.sh +++ b/jjb/packaging/test-puppet.sh @@ -15,28 +15,38 @@ sudo yum install -y ruby-devel gcc-c++ zlib-devel patch redhat-rpm-config make r # Install RVM to help build recent version of Ruby # The ruby_dep gem requires >=2.2.5, 2.0.0 is the latest pre-packaged for CentOS -gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 +gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys \ + 409B6B1796C275462A1703113804BB82D39DC0E3 \ + 7D2BAF1CF37B13E2069D6956105BD0E739499BDB curl -L get.rvm.io | bash -s stable # Expected by RVM, seems required to make RVM functions (`rvm use`) available # Silence absurdly verbose rvm output by temporally not echoing commands set +x +# Source line has a non-zero exit somewhere, that RVM doesn't mean to indicate +# a real failure, but causes our jobs to fail when fail-on-errors is enabled. +set +e # shellcheck disable=SC1090 source "$HOME/.rvm/scripts/rvm" -rvm install 2.4.0 +set -e +rvm install 2.6.0 set -x ruby --version # This has to be done as a login shell to get rvm fns # https://rvm.io/support/faq#what-shell-login-means-bash-l # http://superuser.com/questions/306530/run-remote-ssh-command-with-full-login-shell -bash -lc "rvm use 2.4.0 --default" +bash -lc "rvm use 2.6.0 --default" ruby --version +# Update RubyGems using itself, as OS package may be old +# Ran into RubyGems 2.x installed by OS, 3.x required by Bundler in INTPAK-230 +gem update --system + # Install gems dependencies of puppet-opendaylight via Bundler gem install bundler echo export PATH="\\$PATH:/usr/local/bin" >> "$HOME/.bashrc" # RVM's loaded functions print lots of output at this step, silence them set +x -pushd "$WORKSPACE/puppet" +pushd "$WORKSPACE/packaging-puppet" set -x bundle install bundle update