[ARVADOS-DEV] created: 5c45372ab04539fde7b2ff7543e07a6539f46e95

Git user git at public.curoverse.com
Tue Oct 25 15:53:17 EDT 2016


        at  5c45372ab04539fde7b2ff7543e07a6539f46e95 (commit)


commit 5c45372ab04539fde7b2ff7543e07a6539f46e95
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Oct 25 15:53:02 2016 -0400

    9842: Replace portion of shell script with install-arvados-jobs-image python script.

diff --git a/jenkins/run-deploy.sh b/jenkins/run-deploy.sh
index db83c2a..4b8a677 100755
--- a/jenkins/run-deploy.sh
+++ b/jenkins/run-deploy.sh
@@ -207,48 +207,22 @@ if [[ "$ARVADOS_API_HOST" == "" ]] || [[ "$ARVADOS_API_TOKEN" == "" ]]; then
   exit 1
 fi
 
-title "Locating Arvados Standard Docker images project"
+title "Installing arvados/jobs docker image"
 
-JSON_FILTER="[[\"name\", \"=\", \"Arvados Standard Docker Images\"], [\"owner_uuid\", \"=\", \"$IDENTIFIER-tpzed-000000000000000\"]]"
-DOCKER_IMAGES_PROJECT=`ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN arv --format=uuid group list --filters="$JSON_FILTER"`
-
-if [[ "$DOCKER_IMAGES_PROJECT" == "" ]]; then
-  title "Warning: Arvados Standard Docker Images project not found. Creating it."
-
-  DOCKER_IMAGES_PROJECT=`ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN arv --format=uuid group create --group "{\"owner_uuid\":\"$IDENTIFIER-tpzed-000000000000000\", \"name\":\"Arvados Standard Docker Images\", \"group_class\":\"project\"}"`
-  ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN arv link create --link "{\"tail_uuid\":\"$IDENTIFIER-j7d0g-fffffffffffffff\", \"head_uuid\":\"$DOCKER_IMAGES_PROJECT\", \"link_class\":\"permission\", \"name\":\"can_read\" }"
-  if [[ "$?" != "0" ]]; then
-    title "ERROR: could not create standard Docker images project Please create it, cf. http://doc.arvados.org/install/create-standard-objects.html"
-    exit 1
-  fi
-fi
-
-title "Found Arvados Standard Docker Images project with uuid $DOCKER_IMAGES_PROJECT"
 GIT_COMMIT=`ssh -o "StrictHostKeyChecking no" $IDENTIFIER cat /usr/local/arvados/src/git-commit.version`
 
 if [[ "$?" != "0" ]] || [[ "$GIT_COMMIT" == "" ]]; then
   title "ERROR: unable to get arvados/jobs Docker image git revision"
   exit 1
-else
-  title "Found git commit for arvados/jobs Docker image: $GIT_COMMIT"
 fi
+title "Found git commit for arvados/jobs Docker image: $GIT_COMMIT"
 
-run_command shell.$IDENTIFIER ECODE "ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN /usr/local/rvm/bin/rvm-exec default arv keep docker" |grep -q $GIT_COMMIT
-
-if [[ "$?" == "0" ]]; then
-  title "Found latest arvados/jobs Docker image, nothing to upload"
-  # Just in case it isn't yet, tag the image as latest
-  ssh -o "StrictHostKeyChecking no" shell.$IDENTIFIER "ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN arv-keepdocker arvados/jobs latest"
-else
-  title "Installing latest arvados/jobs Docker image"
-  ssh -o "StrictHostKeyChecking no" shell.$IDENTIFIER "ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN /usr/local/rvm/bin/rvm-exec default arv keep docker --pull --project-uuid=$DOCKER_IMAGES_PROJECT arvados/jobs $GIT_COMMIT"
-  ## adding latest tag too  refs 9254
-  ssh -o "StrictHostKeyChecking no" shell.$IDENTIFIER docker tag -f arvados/jobs:$GIT_COMMIT arvados/jobs:latest
-  ssh -o "StrictHostKeyChecking no" shell.$IDENTIFIER "ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN arv-keepdocker --project-uuid=$DOCKER_IMAGES_PROJECT arvados/jobs latest"
-  if [[ "$?" -ne 0 ]]; then
-    title "'git pull' failed exiting..."
+cat "$(dirname "$0")/install-arvados-jobs-image" | \
+    ssh -o "StrictHostKeyChecking no" shell.$IDENTIFIER \
+    "ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN python - --git-commit $GIT_COMMIT -v"
+if [[ "$?" != 0 ]]; then
+    title "ERROR: unable to update arvados/jobs image"
     exit 1
-  fi
 fi
 
 title "Gathering list of shell and Keep nodes"

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list