projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 8654-arv-jobs-cwl-runner
[arvados.git]
/
build
/
run-build-docker-jobs-image.sh
diff --git
a/build/run-build-docker-jobs-image.sh
b/build/run-build-docker-jobs-image.sh
index fcf849bc4df9fe7e991046b150305830a711cce9..15f788163ed604ea4592daae668c3dbe9e888923 100755
(executable)
--- a/
build/run-build-docker-jobs-image.sh
+++ b/
build/run-build-docker-jobs-image.sh
@@
-54,21
+54,23
@@
do
esac
done
esac
done
-
EXITCODE=0
EXITCODE=0
-COLUMNS=80
-
-title () {
- printf "\n%*s\n\n" $(((${#title}+$COLUMNS)/2)) "********** $1 **********"
+exit_cleanly() {
+ trap - INT
+ report_outcomes
+ exit $EXITCODE
}
}
+COLUMNS=80
+. $WORKSPACE/build/run-library.sh
+
docker_push () {
if [[ ! -z "$tags" ]]
then
for tag in $( echo $tags|tr "," " " )
do
docker_push () {
if [[ ! -z "$tags" ]]
then
for tag in $( echo $tags|tr "," " " )
do
- $DOCKER tag
-f
$1 $1:$tag
+ $DOCKER tag $1 $1:$tag
done
fi
done
fi
@@
-82,17
+84,9
@@
docker_push () {
done
if [[ "$ECODE" != "0" ]]; then
done
if [[ "$ECODE" != "0" ]]; then
- title "!!!!!! docker push $* failed !!!!!!"
EXITCODE=$(($EXITCODE + $ECODE))
fi
EXITCODE=$(($EXITCODE + $ECODE))
fi
-}
-
-timer_reset() {
- t0=$SECONDS
-}
-
-timer() {
- echo -n "$(($SECONDS - $t0))s"
+ checkexit $ECODE "docker push $*"
}
# Sanity check
}
# Sanity check
@@
-131,15
+125,19
@@
rm -f config.yml
# Get test config.yml file
cp $HOME/docker/config.yml .
# Get test config.yml file
cp $HOME/docker/config.yml .
-./build.sh jobs-image
+if [[ ! -z "$tags" ]]; then
+ COMMIT=${tags/,*/} ./build.sh jobs-image
+else
+ ./build.sh jobs-image
+fi
ECODE=$?
if [[ "$ECODE" != "0" ]]; then
ECODE=$?
if [[ "$ECODE" != "0" ]]; then
- title "!!!!!! docker BUILD FAILED !!!!!!"
EXITCODE=$(($EXITCODE + $ECODE))
fi
EXITCODE=$(($EXITCODE + $ECODE))
fi
+checkexit $ECODE "docker build"
title "docker build complete (`timer`)"
title "uploading images"
title "docker build complete (`timer`)"
title "uploading images"
@@
-155,10
+153,10
@@
else
docker login -u arvados
docker_push arvados/jobs
docker login -u arvados
docker_push arvados/jobs
- title "upload arvados images
complete
(`timer`)"
+ title "upload arvados images
finished
(`timer`)"
else
else
- title "upload arvados images SKIPPED because no --upload option set"
+ title "upload arvados images SKIPPED because no --upload option set
(`timer`)
"
fi
fi
fi
fi
-exit
$EXITCODE
+exit
_cleanly