Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit 24c79a2

Browse files
prefer PredefinedVariables.CI_COMMIT_TAG as default docker image tag in kaniko, if available
1 parent c93d7ac commit 24c79a2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gcip/addons/kaniko/jobs.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ def execute(
8282
if image_name is None:
8383
image_name = PredefinedVariables.CI_PROJECT_NAME
8484

85-
if not image_tag and PredefinedVariables.CI_COMMIT_REF_SLUG:
86-
image_tag = PredefinedVariables.CI_COMMIT_REF_SLUG
85+
if not image_tag:
86+
if PredefinedVariables.CI_COMMIT_TAG:
87+
image_tag = PredefinedVariables.CI_COMMIT_TAG
88+
elif PredefinedVariables.CI_COMMIT_REF_SLUG:
89+
image_tag = PredefinedVariables.CI_COMMIT_REF_SLUG
8790

8891
image_tag_postfix = ""
8992
if image_tag:

0 commit comments

Comments
 (0)