Skip to content

Commit 5c27edf

Browse files
committed
fix(gitops-cli): prevent bumping to non-existent image prefix
1 parent 177c57b commit 5c27edf

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

charts/gitops/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: v1
22
appVersion: "1.0"
33
description: GitOps Server Helm chart.
44
name: gitops
5-
version: 0.9.16
5+
version: 0.9.17

gitops/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from . import monkeypatches # NOQA
66
from .utils.cli import success, warning
77

8-
__version__ = "0.9.16"
8+
__version__ = "0.9.17"
99

1010

1111
# Checking gitops version matches cluster repo version.

gitops/core.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@ def bump(
8484
new_image_tag = get_latest_image(app.image_repository_name, new_image_prefix)
8585
else:
8686
new_image_tag = get_image(image_tag)
87-
if new_image_tag != prev_image_tag:
87+
88+
if not new_image_tag:
89+
print(
90+
f"Skipping {colourise(app_name, Fore.LIGHTRED_EX)}: no image matching"
91+
f" {colour_image(new_image_tag)}"
92+
)
93+
elif new_image_tag != prev_image_tag:
8894
print(
8995
f"Bumping {colourise(app_name, Fore.LIGHTGREEN_EX)}: {colour_image(prev_image_tag)}"
9096
f" -> {colour_image(new_image_tag)}"

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "gitops"
3-
version = "0.9.16"
3+
version = "0.9.17"
44
description = "Manage multiple apps across one or more k8s clusters."
55
authors = ["Jarek Głowacki <[email protected]>"]
66
license = "BSD"

0 commit comments

Comments
 (0)