Skip to content

Commit

Permalink
#1699 made building the Ditto UI image optional and configurable in b…
Browse files Browse the repository at this point in the history
…uild-images.sh

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
  • Loading branch information
thjaeckle committed Dec 8, 2023
1 parent 0777063 commit 5346e2c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ SERVICES=(
: "${IMAGE_VERSION:="${SERVICE_VERSION}"}"

print_usage() {
printf "%s [-p HTTP(S) PROXY HOST:PORT]\n" "$1"
printf "%s [-uPh] [-p HTTP(S) PROXY HOST:PORT]\n" "$1"
printf " -u build the ditto-ui as docker image\n" "$1"
printf " -P push the built docker images\n" "$1"
printf " -h display help\n" "$1"
}

print_used_proxies() {
Expand Down Expand Up @@ -98,7 +101,9 @@ build_all_docker_images() {
for i in "${SERVICES[@]}"; do
build_docker_image "$i"
done
build_ditto_ui_docker_image
if [[ "$BUILD_UI" == "true" ]]; then
build_ditto_ui_docker_image
fi
}

set_proxies() {
Expand All @@ -109,11 +114,14 @@ set_proxies() {
}

evaluate_script_arguments() {
while getopts "p:hP" opt; do
while getopts "p:uhP" opt; do
case ${opt} in
p)
set_proxies "$OPTARG"
;;
u)
BUILD_UI="true"
;;
P)
PUSH_CONTAINERS="true"
;;
Expand All @@ -130,6 +138,6 @@ evaluate_script_arguments() {
if [ 0 -eq $# ]; then
print_used_proxies
build_all_docker_images
elif evaluate_script_arguments "$@"; then
elif evaluate_script_arguments $@; then
build_all_docker_images
fi

0 comments on commit 5346e2c

Please sign in to comment.