[ARVADOS-DEV] created: a1fe656edcd674ae996f3e70f19c063679158e05

git at public.curoverse.com git at public.curoverse.com
Fri May 22 16:53:07 EDT 2015


        at  a1fe656edcd674ae996f3e70f19c063679158e05 (commit)


commit a1fe656edcd674ae996f3e70f19c063679158e05
Author: Nico Cesar <nico at nicocesar.com>
Date:   Fri May 22 16:52:40 2015 -0400

    added --tags support
    
    refs #6135

diff --git a/jenkins/run-docker-tests.sh b/jenkins/run-docker-tests.sh
index f0afccb..59468a7 100755
--- a/jenkins/run-docker-tests.sh
+++ b/jenkins/run-docker-tests.sh
@@ -1,10 +1,11 @@
-#!/bin/bash
+#!/bin/bash -x
 
 function usage {
     echo >&2
     echo >&2 "usage: $0 [options]"
     echo >&2
     echo >&2 "$0 options:"
+    echo >&2 "  -t, --tags [csv_tags]         comma separated tags"
     echo >&2 "  -u, --upload                  Upload the images (docker push)"
     echo >&2 "  -h, --help                    Display this help and exit"
     echo >&2
@@ -14,8 +15,8 @@ function usage {
 upload=false
 
 # NOTE: This requires GNU getopt (part of the util-linux package on Debian-based distros).
-TEMP=`getopt -o hu \
-    --long help,upload \
+TEMP=`getopt -o hut: \
+    --long help,upload,tags: \
     -n "$0" -- "$@"`
 
 if [ $? != 0 ] ; then echo "Use -h for help"; exit 1 ; fi
@@ -29,6 +30,12 @@ do
             upload=true
             shift
             ;;
+        -t | --tags)
+	    case "$2" in
+		"") echo "ERROR: --tags needs a parameter"; usage; exit 1;;
+		*) tags=$2; shift 2
+	    esac
+            ;;
         --)
             shift
             break
@@ -50,7 +57,16 @@ title () {
 }
 
 docker_push () {
-  # Sometimes docker push fails; retry it a few times if necessary.
+    echo $tags
+    if [[ ! -z "$tags" ]]
+    then
+	for tag in $( echo $tags|tr "," " " )
+	do
+	    $DOCKER tag $1 $1:$tag
+	done
+    fi
+
+    # Sometimes docker push fails; retry it a few times if necessary.
     for i in `seq 1 5`; do
         $DOCKER push $*
         ECODE=$?

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list