From 5cbbafa65e069fc5376c7ff177fa2110a379d8c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Fri, 28 Oct 2022 13:08:27 +0200 Subject: [PATCH] Fix duplicate `debian-bullseye` in image name This is due to usage of OS and DEBIAN in a CI. Ignore DEBIAN/UBI if OS is specified. --- scripts/lib/custom-docker-build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/lib/custom-docker-build b/scripts/lib/custom-docker-build index 5e78593..1d1bcb3 100755 --- a/scripts/lib/custom-docker-build +++ b/scripts/lib/custom-docker-build @@ -389,7 +389,14 @@ function build_custom_if_needed() { printf "\n\nSUCCESS - Successfully built:\n\t%s\n" "$full_image_name" } -# Use DEBIAN by default unless specified otherwise -DEBIAN=${DEBIAN:-bullseye} +# If OS is specified ignore other ways to specify system +# Use DEBIAN if UBI is not specified +if [[ -n "$OS" ]]; then + unset DEBIAN UBI +elif [[ -n "$UBI" ]]; then + unset DEBIAN +else + DEBIAN=${DEBIAN:-bullseye} +fi build_custom_if_needed $@