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