summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorPasha Kostohrys <pavel@codefresh.io>2024-05-29 19:09:35 +0300
committerPasha Kostohrys <pavel@codefresh.io>2024-05-29 19:09:35 +0300
commitf282927d72f890111297fd75eb64b53409c0223a (patch)
tree932f446383fd8916b0a96b8cd785fce50fdd4be1 /pkg
parent4a08ed6c733a7fa8c7809419e3301200771a4a96 (diff)
check if alias exist
Signed-off-by: Pasha Kostohrys <pavel@codefresh.io>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/argocd/update.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/argocd/update.go b/pkg/argocd/update.go
index 85dee36..0f1cab2 100644
--- a/pkg/argocd/update.go
+++ b/pkg/argocd/update.go
@@ -419,13 +419,18 @@ func marshalParamsOverride(app *v1alpha1.Application, originalData []byte) ([]by
images := GetImagesAndAliasesFromApplication(app)
for _, c := range images {
+
+ if c.ImageAlias == "" {
+ continue
+ }
+
helmAnnotationParamName, helmAnnotationParamVersion := getHelmParamNamesFromAnnotation(app.Annotations, c)
if helmAnnotationParamName == "" {
- return nil, fmt.Errorf("could not find an image-name annotation for image %s", c.ImageAlias)
+ return nil, fmt.Errorf("could not find an image-name annotation for image %s", c.ImageName)
}
if helmAnnotationParamVersion == "" {
- return nil, fmt.Errorf("could not find an image-tag annotation for image %s", c.ImageAlias)
+ return nil, fmt.Errorf("could not find an image-tag annotation for image %s", c.ImageName)
}
helmParamName := getHelmParam(appSource.Helm.Parameters, helmAnnotationParamName)