forked from mercure-imaging/mercure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
push-docker.sh
executable file
·51 lines (47 loc) · 1.68 KB
/
push-docker.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
# 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 "VERSION" ]; then
echo "Error: VERSION file missing. Unable to proceed."
exit 1
fi
VERSION=`cat 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
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
fi
echo ""
echo "Done."
echo ""