run-deploy.sh should also handle pre-1.4 installations.
authorWard Vandewege <wvandewege@veritasgenetics.com>
Thu, 2 May 2019 15:00:48 +0000 (11:00 -0400)
committerWard Vandewege <wvandewege@veritasgenetics.com>
Thu, 2 May 2019 15:01:13 +0000 (11:01 -0400)
No issue #

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege@veritasgenetics.com>

jenkins/run-deploy.sh

index 671cc68cf1fc61c67d92f4fd20a719164a78357d..9e599cd02a0092f471765c3315e5ed8b78e6feba 100755 (executable)
@@ -272,7 +272,16 @@ if [[ "$NODE" == "" ]]; then
   fi
 
   title "Found Arvados Standard Docker Images project with uuid $DOCKER_IMAGES_PROJECT"
-  GIT_COMMIT=`ssh -o "StrictHostKeyChecking no" shell.$IDENTIFIER "/usr/share/python2.7/dist/python-arvados-cwl-runner/bin/python -c 'import arvados_cwl ; print arvados_cwl.__version__'" 2>&1 |grep -v INFO:rdflib:RDFLib`
+
+       # from 1.4 onwards, we use the python executable that is part of the python-arvados-cwl-runner package
+  GIT_COMMIT=`ssh -o "StrictHostKeyChecking no" shell.$IDENTIFIER "bash -s" <<EOF
+if [[ -e "/usr/share/python2.7/dist/python-arvados-cwl-runner/bin/python" ]]; then
+  /usr/share/python2.7/dist/python-arvados-cwl-runner/bin/python -c 'import arvados_cwl ; print arvados_cwl.__version__' 2>&1 |grep -v INFO:rdflib:RDFLib
+else
+  /usr/bin/python -c 'import arvados_cwl ; print arvados_cwl.__version__' 2>&1 |grep -v INFO:rdflib:RDFLib
+fi
+EOF
+`
 
   if [[ "$?" != "0" ]] || [[ "$GIT_COMMIT" == "" ]]; then
     title "ERROR: unable to get arvados/jobs Docker image git revision"