From 31178e940da206061a495916b2b951ea7524aa7e Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 19 May 2023 15:49:24 +0200 Subject: [PATCH] fix image build --- src/main/python/ddadevops/application/image_build_service.py | 2 -- src/main/python/ddadevops/domain/init_service.py | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/python/ddadevops/application/image_build_service.py b/src/main/python/ddadevops/application/image_build_service.py index f3fa3f2..811131a 100644 --- a/src/main/python/ddadevops/application/image_build_service.py +++ b/src/main/python/ddadevops/application/image_build_service.py @@ -58,8 +58,6 @@ class ImageBuildService: def dockerhub_publish(self, devops: Devops): image = devops.specialized_builds[BuildType.IMAGE] - if image.image_tag is None or image.image_tag == "": - raise ValueError(f"image_tag must not be empty.") self.image_api.dockerhub_publish( devops.name, image.image_dockerhub_user, image.image_tag ) diff --git a/src/main/python/ddadevops/domain/init_service.py b/src/main/python/ddadevops/domain/init_service.py index 3d36e36..e05a6e3 100644 --- a/src/main/python/ddadevops/domain/init_service.py +++ b/src/main/python/ddadevops/domain/init_service.py @@ -105,7 +105,8 @@ class InitService: if not tag: tag = version.to_string() - result["image_tag"] = tag + if tag: + result["image_tag"] = tag return result