From a4fc6d6ca3eaa52fb3b5fda7a4df73ce0420bccf Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Fri, 29 Jan 2016 11:47:10 -0800 Subject: [PATCH] better build all Signed-off-by: Jessica Frazelle --- build-all.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build-all.sh b/build-all.sh index a3694c1..e7ad010 100755 --- a/build-all.sh +++ b/build-all.sh @@ -10,10 +10,10 @@ unset IFS for f in "${files[@]}"; do image=${f%Dockerfile} base=${image%%\/*} - suite=${image##*\/} build_dir=$(dirname $f) + suite=${build_dir##*\/} - if [[ -z "$suite" ]]; then + if [[ -z "$suite" ]] || [[ "$suite" == "$base" ]]; then suite=latest fi @@ -27,4 +27,10 @@ for f in "${files[@]}"; do echo " --- " docker push --disable-content-trust=false r.j3ss.co/${base}:${suite} + + # also push the tag latest for "stable" tags + if [[ "$suite" == "stable" ]]; then + docker tag r.j3ss.co/${base}:${suite} r.j3ss.co/${base}:latest + docker push --disable-content-trust=false r.j3ss.co/${base}:latest + fi done