Silence absurdly verbose pup-odl rvm output
[releng/builder.git] / jjb / packaging / include-raw-test-puppet.sh
index d79bd1c19e2f1180e26a5445cb0b0dc4493cde73..22b151176cf080fbe0e1c90d5ed2424acdbb12f3 100644 (file)
@@ -9,12 +9,8 @@ set -ex -o pipefail
 # Adapted from puppet-opendaylight/Vagrantfile
 # https://github.com/dfarrell07/puppet-opendaylight/blob/master/Vagrantfile
 
-# Update Int/Pack's puppet-opendaylight submodule to latest master
-pushd $WORKSPACE/packaging
-git submodule init
-git submodule update --remote
-
 # Install system-wide dependencies
+# TODO: Are all of these still needed?
 sudo yum install -y ruby-devel gcc-c++ zlib-devel patch redhat-rpm-config make rubygems
 
 # Install RVM to help build recent version of Ruby
@@ -22,8 +18,12 @@ sudo yum install -y ruby-devel gcc-c++ zlib-devel patch redhat-rpm-config make r
 gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
 curl -L get.rvm.io | bash -s stable
 # Expected by RVM, seems required to make RVM functions (`rvm use`) available
-source $HOME/.rvm/scripts/rvm
+# Silence absurdly verbose rvm output by temporally not echoing commands
+set +x
+# shellcheck disable=SC1090
+source "$HOME/.rvm/scripts/rvm"
 rvm install 2.4.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
@@ -33,10 +33,13 @@ ruby --version
 
 # Install gems dependencies of puppet-opendaylight via Bundler
 gem install bundler
-echo export PATH=\\$PATH:/usr/local/bin >> $HOME/.bashrc
-pushd $WORKSPACE/packaging/puppet/puppet-opendaylight
+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"
+set -x
 bundle install
 bundle update
 
-# Quick+important tests: Linting, rspec and Beaker on CentOS container tests
-bundle exec rake sanity
+# Execute set of tests passed as param from job
+bundle exec rake "$TEST_SUITE"