3 # Copyright (C) The Arvados Authors. All rights reserved.
5 # SPDX-License-Identifier: AGPL-3.0
12 if [[ "$INSTANCE" == '' ]]; then
13 echo "Syntax: $0 <instance> [revision]"
17 if [[ "$REVISION" == '' ]]; then
18 # See if there's a configuration file with the revision?
19 CONFIG_PATH=/home/jenkins/configuration/$INSTANCE.arvadosapi.com-versions.conf
20 if [[ -f $CONFIG_PATH ]]; then
21 echo "Loading git revision from $CONFIG_PATH"
23 REVISION=$ARVADOS_GIT_REVISION
27 if [[ "$REVISION" != '' ]]; then
28 echo "Git revision is $REVISION"
30 echo "No valid git revision found, proceeding with what is in place."
34 if ! [[ -n "$WORKSPACE" ]]; then
35 echo "WORKSPACE environment variable not set"
40 txt="********** $1 **********"
41 printf "\n%*s%s\n\n" $((($COLUMNS-${#txt})/2)) "" "$txt"
49 echo -n "$(($SECONDS - $t0))s"
52 source /etc/profile.d/rvm.sh
55 title "Starting diagnostics"
60 if [[ "$REVISION" != '' ]]; then
61 git checkout $REVISION
66 if [[ "$ECODE" != "0" ]]; then
67 title "!!!!!! DIAGNOSTICS FAILED (`timer`) !!!!!!"
68 EXITCODE=$(($EXITCODE + $ECODE))
72 cp -f /home/jenkins/diagnostics/arvados-workbench/$INSTANCE-application.yml $WORKSPACE/apps/workbench/config/application.yml
74 cd $WORKSPACE/apps/workbench
76 HOME="$GEMHOME" bundle install --no-deployment
78 if [[ ! -d tmp ]]; then
82 if [ $INSTANCE == '9tee4' ]
84 RAILS_ENV=diagnostics bundle exec rake TEST=test/diagnostics/container_request_test.rb
86 RAILS_ENV=diagnostics bundle exec rake TEST=test/diagnostics/pipeline_test.rb
91 if [[ "$REVISION" != '' ]]; then
95 if [[ "$ECODE" != "0" ]]; then
96 title "!!!!!! DIAGNOSTICS FAILED (`timer`) !!!!!!"
97 EXITCODE=$(($EXITCODE + $ECODE))
101 title "Diagnostics complete (`timer`)"