projects
/
arvados-dev.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
6388: Extend API server upgrade script to do initial database setup.
[arvados-dev.git]
/
jenkins
/
run-docker-tests.sh
diff --git
a/jenkins/run-docker-tests.sh
b/jenkins/run-docker-tests.sh
index f0afccb845b595cdcd8777d58af7c866801fdd6d..eff75ac43f56ec6c3b81b20c76283ae3df9e3164 100755
(executable)
--- a/
jenkins/run-docker-tests.sh
+++ b/
jenkins/run-docker-tests.sh
@@
-5,6
+5,7
@@
function usage {
echo >&2 "usage: $0 [options]"
echo >&2
echo >&2 "$0 options:"
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
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).
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 hu
t:
\
+ --long help,upload
,tags:
\
-n "$0" -- "$@"`
if [ $? != 0 ] ; then echo "Use -h for help"; exit 1 ; fi
-n "$0" -- "$@"`
if [ $? != 0 ] ; then echo "Use -h for help"; exit 1 ; fi
@@
-29,6
+30,19
@@
do
upload=true
shift
;;
upload=true
shift
;;
+ -t | --tags)
+ case "$2" in
+ "")
+ echo "ERROR: --tags needs a parameter";
+ usage;
+ exit 1
+ ;;
+ *)
+ tags=$2;
+ shift 2
+ ;;
+ esac
+ ;;
--)
shift
break
--)
shift
break
@@
-50,7
+64,15
@@
title () {
}
docker_push () {
}
docker_push () {
- # Sometimes docker push fails; retry it a few times if necessary.
+ 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=$?
for i in `seq 1 5`; do
$DOCKER push $*
ECODE=$?
@@
-129,6
+151,11
@@
if [[ "$ECODE" != "0" ]]; then
title "upload arvados images SKIPPED because build failed"
else
if [[ $upload == true ]]; then
title "upload arvados images SKIPPED because build failed"
else
if [[ $upload == true ]]; then
+ ## 20150526 nico -- *sometimes* dockerhub needs re-login
+ ## even though credentials are already in .dockercfg
+ docker login -u arvados
+
+
docker_push arvados/api
docker_push arvados/compute
docker_push arvados/doc
docker_push arvados/api
docker_push arvados/compute
docker_push arvados/doc