Skip to content

Commit

Permalink
eclipse-ditto#1699 made building the Ditto UI image optional and conf…
Browse files Browse the repository at this point in the history
…igurable in build-images.sh

Signed-off-by: Thomas Jäckle <[email protected]>
  • Loading branch information
thjaeckle authored and thfries committed Jan 13, 2024
1 parent e6837fd commit 9670c66
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 9670c66

Please sign in to comment.