Skip to content

Commit

Permalink
Allow pushing containers too
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Reimann <jreimann@redhat.com>
  • Loading branch information
ctron committed Dec 8, 2021
1 parent 4e8d870 commit 554bf8b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions build-images.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

# Copyright (c) 2020 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
Expand Down Expand Up @@ -62,6 +64,10 @@ build_docker_image() {
--build-arg SERVICE_VERSION=$SERVICE_VERSION \
-t "$image_tag":$IMAGE_VERSION \
"$SCRIPTDIR"

if [[ "$PUSH_CONTAINERS" == "true" ]]; then
$DOCKER_BIN push "$image_tag":$IMAGE_VERSION
fi
}

build_all_docker_images() {
Expand All @@ -78,18 +84,21 @@ set_proxies() {
}

evaluate_script_arguments() {
while getopts "p:h" opt; do
while getopts "p:hP" opt; do
case ${opt} in
p)
set_proxies "$OPTARG"
return 0
;;
P)
PUSH_CONTAINERS="true"
;;
h | *)
print_usage "$0"
return 1
;;
esac
done
return 0
}

# Here the programme begins
Expand Down

0 comments on commit 554bf8b

Please sign in to comment.