* run-deploy.sh: fix logic bug in arv-keepdocker call
authorWard Vandewege <ward@jhvc.com>
Sat, 21 Mar 2020 01:45:03 +0000 (21:45 -0400)
committerWard Vandewege <ward@jhvc.com>
Sat, 21 Mar 2020 01:45:03 +0000 (21:45 -0400)
* get version from python3-arvados-cwl-runner package

refs #16220

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@jhvc.com>

jenkins/run-deploy.sh

index 0d87ca59ac7968a91133c705287bff2162e47dc0..023b4b301776cf3a13a5d284486f80809dc99a9f 100755 (executable)
@@ -321,7 +321,7 @@ if [[ "$NODE" == "" ]]; then
 
   title "Found Arvados Standard Docker Images project with uuid $DOCKER_IMAGES_PROJECT"
 
-  VERSION=`ssh -t -p$SSH_PORT -o "StrictHostKeyChecking no" -o "ConnectTimeout 125" $IDENTIFIER apt-cache policy python-arvados-cwl-runner|grep Candidate`
+  VERSION=`ssh -t -p$SSH_PORT -o "StrictHostKeyChecking no" -o "ConnectTimeout 125" $IDENTIFIER apt-cache policy python3-arvados-cwl-runner|grep Candidate`
   VERSION=`echo $VERSION|cut -f2 -d' '|cut -f1 -d-`
 
   if [[ "$?" != "0" ]] || [[ "$VERSION" == "" ]]; then
@@ -333,7 +333,7 @@ if [[ "$NODE" == "" ]]; then
 
   if [[ "$SHELL_NODE_FOR_ARV_KEEPDOCKER" == "" ]]; then
     ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN arv-keepdocker |grep -q $VERSION
-    if [[ "$?" == "0" ]]; then
+    if [[ $? -eq 0 ]]; then
       title "Found latest arvados/jobs Docker image, nothing to upload"
       # Just in case it isn't yet, tag the image as latest
       title "Tag arvados/jobs Docker image $VERSION as latest"
@@ -360,7 +360,7 @@ if [[ "$NODE" == "" ]]; then
   else
     ssh -t -p$SSH_PORT -o "StrictHostKeyChecking no" -o "ConnectTimeout 125" $SHELL_NODE_FOR_ARV_KEEPDOCKER "ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN arv-keepdocker" |grep -q $VERSION
 
-    if [[ $? -ne 0 ]]; then
+    if [[ $? -eq 0 ]]; then
       title "Found latest arvados/jobs Docker image, nothing to upload"
       # Just in case it isn't yet, tag the image as latest
       title "Tag arvados/jobs Docker image $VERSION as latest"