forked from debezium/container-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-tool-images.sh
executable file
·34 lines (27 loc) · 1.11 KB
/
build-tool-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
#!/bin/bash
set -eo pipefail
if [[ -z "$TAG" ]]; then
TAG="$1"
fi
DEBEZIUM_TOOLS="tooling website-builder"
if [ -z "${DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME}" ]; then
DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME=quay.io/debezium
fi;
if [ -z "${DEBEZIUM_DOCKER_REGISTRY_SECONDARY_NAME}" ]; then
DEBEZIUM_DOCKER_REGISTRY_SECONDARY_NAME=debezium
fi;
for TOOL in $DEBEZIUM_TOOLS; do
echo ""
echo "****************************************************************"
echo "** Building ${DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME}/$TOOL:$TAG"
echo "****************************************************************"
docker build -t "${DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME}/$TOOL:$TAG" "$TOOL"
if [ "$PUSH_IMAGES" == "true" ]; then
echo "Pushing the image into the registry"
docker push "${DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME}/$TOOL:$TAG"
if [ -n "${DEBEZIUM_DOCKER_REGISTRY_SECONDARY_NAME}" ]; then
docker tag "${DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME}/$TOOL:$TAG" "${DEBEZIUM_DOCKER_REGISTRY_SECONDARY_NAME}/$TOOL:$TAG"
docker push "${DEBEZIUM_DOCKER_REGISTRY_SECONDARY_NAME}/$TOOL:$TAG"
fi;
fi
done