forked from eclipse-hono/hono
-
Notifications
You must be signed in to change notification settings - Fork 2
/
push_hono_images.sh
executable file
·50 lines (48 loc) · 1.59 KB
/
push_hono_images.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
#!/bin/bash
#*******************************************************************************
# Copyright (c) 2016, 2019 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#*******************************************************************************
TAG=$1
CR=$2
IMAGES="hono-adapter-amqp-vertx \
hono-adapter-coap-vertx \
hono-adapter-http-vertx \
hono-adapter-kura \
hono-adapter-lora-vertx \
hono-adapter-mqtt-vertx \
hono-adapter-sigfox-vertx \
hono-service-auth \
hono-service-device-connection \
hono-service-device-registry-file \
hono-service-device-registry-mongodb"
if [ -n "$TAG" ]
then
for image in $IMAGES
do
ECLIPSE_IMAGE_NAME="eclipse/$image"
IMAGE_NAME=$ECLIPSE_IMAGE_NAME
if [ -n "$CR" ]
then
IMAGE_NAME="$CR/$IMAGE_NAME"
docker tag $ECLIPSE_IMAGE_NAME:$TAG $IMAGE_NAME:$TAG
fi
echo "pushing image $IMAGE_NAME:$TAG ..."
docker push $IMAGE_NAME:$TAG
done
else
echo "This script can be used to push Hono's images from"
echo "the local Docker registry to Docker Hub."
echo ""
echo "usage: push_hono_images.sh TAG [CR]"
echo "where TAG is the TAG to push to Docker Hub"
echo "and the (optional) CR is the name of the container registry to push to"
fi