X-Git-Url: https://git.arvados.org/arvados-dev.git/blobdiff_plain/2923ce9f48f072119e8c5d0771ae3480a2679864..82807388a1f7dd901e619419690253a5fd58663b:/jenkins/run-diagnostics-suite.sh diff --git a/jenkins/run-diagnostics-suite.sh b/jenkins/run-diagnostics-suite.sh index 83e20be..015a053 100755 --- a/jenkins/run-diagnostics-suite.sh +++ b/jenkins/run-diagnostics-suite.sh @@ -3,12 +3,29 @@ EXITCODE=0 INSTANCE=$1 +REVISION=$2 if [[ "$INSTANCE" == '' ]]; then - echo "Syntax: $0 " + echo "Syntax: $0 [revision]" exit 1 fi +if [[ "$REVISION" == '' ]]; then + # See if there's a configuration file with the revision? + CONFIG_PATH=/home/jenkins/configuration/$INSTANCE.arvadosapi.com-versions.conf + if [[ -f $CONFIG_PATH ]]; then + echo "Loading git revision from $CONFIG_PATH" + . $CONFIG_PATH + REVISION=$ARVADOS_GIT_REVISION + fi +fi + +if [[ "$REVISION" != '' ]]; then + echo "Git revision is $REVISION" +else + echo "No valid git revision found, proceeding with what is in place." +fi + # Sanity check if ! [[ -n "$WORKSPACE" ]]; then echo "WORKSPACE environment variable not set" @@ -36,7 +53,11 @@ timer_reset cd $WORKSPACE -cp -f /home/jenkins/diagnostics/arvados-workbench/$INSTANCE-application.yml $WORKSPACE/apps/workbench/config/ +if [[ "$REVISION" != '' ]]; then + git checkout $REVISION +fi + +cp -f /home/jenkins/diagnostics/arvados-workbench/$INSTANCE-application.yml $WORKSPACE/apps/workbench/config/application.yml cd $WORKSPACE/apps/workbench @@ -50,6 +71,10 @@ RAILS_ENV=diagnostics bundle exec rake TEST=test/diagnostics/pipeline_test.rb ECODE=$? +if [[ "$REVISION" != '' ]]; then + git checkout master +fi + if [[ "$ECODE" != "0" ]]; then title "!!!!!! DIAGNOSTICS FAILED (`timer`) !!!!!!" EXITCODE=$(($EXITCODE + $ECODE))