-
Notifications
You must be signed in to change notification settings - Fork 2
/
build
executable file
·30 lines (23 loc) · 882 Bytes
/
build
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
#!/bin/bash
# Env Vars:
# REGISTRY: name of the image registry/namespace to store the images
#
# NOTE: to run this you MUST set the REGISTRY environment variable to
# your own image registry/namespace otherwise the `docker push` commands
# will fail due to an auth failure. Which means, you also need to be logged
# into that registry before you run it.
set -ex
if [[ $REGISTRY = "" ]]; then
echo "You must set the REGISTRY environment variable to the name of your docker registry."
exit 1
fi
# Build the image
docker build -t ${REGISTRY}/cm-watcher ./watch
# And push it
docker push ${REGISTRY}/cm-watcher
docker build -t ${REGISTRY}/kn-watcher ./kn-watch
docker push ${REGISTRY}/kn-watcher
docker build -t ${REGISTRY}/cm-loader ./load
docker push ${REGISTRY}/cm-loader
docker build -t ${REGISTRY}/cm-defaulter ./watch-with-defaults
docker push ${REGISTRY}/cm-defaulter