forked from mercure-imaging/mercure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-push.sh
55 lines (51 loc) · 1.81 KB
/
docker-push.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
set -euo pipefail
# Read the version of the mercure source, which will be used for
# tagging the Docker images, unless a tag has been provided
# through the environment variable MERCURE_TAG
if [ ! -f "app/VERSION" ]; then
echo "Error: VERSION file missing. Unable to proceed."
exit 1
fi
VERSION=`cat app/VERSION`
TAG=${MERCURE_TAG:-$VERSION}
echo "Pushing Docker containers for mercure $VERSION"
echo "Using image tag $TAG"
echo ""
read -p "Proceed (y/n)? " ANS
if [ "$ANS" = "y" ]; then
echo ""
else
echo "Aborted."
exit 0
fi
read -p "Push also under tag 'latest' (y/n)? " ANS_LATEST
docker push mercureimaging/mercure-base:$TAG
docker push mercureimaging/mercure-router:$TAG
docker push mercureimaging/mercure-processor:$TAG
docker push mercureimaging/mercure-receiver:$TAG
docker push mercureimaging/mercure-dispatcher:$TAG
docker push mercureimaging/mercure-bookkeeper:$TAG
docker push mercureimaging/mercure-cleaner:$TAG
docker push mercureimaging/mercure-ui:$TAG
docker push mercureimaging/alpine-sshd:latest
docker push mercureimaging/processing-step:$TAG
docker push mercureimaging/mercure-dummy-processor:$TAG
docker push mercureimaging/mercure-worker:$TAG
if [ "$ANS_LATEST" = "y" ]; then
echo "Now pushing images as 'latest'..."
docker push mercureimaging/mercure-base:latest
docker push mercureimaging/mercure-router:latest
docker push mercureimaging/mercure-processor:latest
docker push mercureimaging/mercure-receiver:latest
docker push mercureimaging/mercure-dispatcher:latest
docker push mercureimaging/mercure-bookkeeper:latest
docker push mercureimaging/mercure-cleaner:latest
docker push mercureimaging/mercure-ui:latest
docker push mercureimaging/processing-step:latest
docker push mercureimaging/mercure-dummy-processor:latest
docker push mercureimaging/mercure-worker:latest
fi
echo ""
echo "Done."
echo ""