Skip to content

Commit

Permalink
Merge pull request validatedpatterns#237 from mhjacks/main
Browse files Browse the repository at this point in the history
Ensure built_tags is handled as an array with blank values file
  • Loading branch information
mhjacks authored Nov 17, 2023
2 parents 86c7eb2 + be21e0c commit 448ef3d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
importPolicy: {}
referencePolicy:
type: Local
{{- if .Values.iot_consumer.built_tags }}
{{- range .Values.iot_consumer.built_tags }}
- name: {{ . | quote }}
from:
kind: DockerImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
ls -al $VALUES_PATH
BUILT_TAGS_PATH="$(cat $(workspaces.config.path)/$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH)"
echo "$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH) : $BUILT_TAGS_PATH"
yq "$BUILT_TAGS_PATH += \"$TAG_VALUE\"" $VALUES_PATH > $VALUES_PATH.tmp
yq "$BUILT_TAGS_PATH += [ \"$TAG_VALUE\" ]" $VALUES_PATH > $VALUES_PATH.tmp
mv $VALUES_PATH.tmp $VALUES_PATH
workingDir: $(workspaces.gitrepos.path)/$(params.subdirectory)
- name: prune-built-tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
importPolicy: {}
referencePolicy:
type: Local
{{- if .Values.iot_consumer.built_tags }}
{{- range .Values.iot_consumer.built_tags }}
- name: {{ $.Values.iot_consumer.tag | quote }}
from:
kind: DockerImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3539,7 +3539,7 @@ spec:
ls -al $VALUES_PATH
BUILT_TAGS_PATH="$(cat $(workspaces.config.path)/$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH)"
echo "$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH) : $BUILT_TAGS_PATH"
yq "$BUILT_TAGS_PATH += \"$TAG_VALUE\"" $VALUES_PATH > $VALUES_PATH.tmp
yq "$BUILT_TAGS_PATH += [ \"$TAG_VALUE\" ]" $VALUES_PATH > $VALUES_PATH.tmp
mv $VALUES_PATH.tmp $VALUES_PATH
workingDir: $(workspaces.gitrepos.path)/$(params.subdirectory)
- name: prune-built-tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3539,7 +3539,7 @@ spec:
ls -al $VALUES_PATH
BUILT_TAGS_PATH="$(cat $(workspaces.config.path)/$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH)"
echo "$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH) : $BUILT_TAGS_PATH"
yq "$BUILT_TAGS_PATH += \"$TAG_VALUE\"" $VALUES_PATH > $VALUES_PATH.tmp
yq "$BUILT_TAGS_PATH += [ \"$TAG_VALUE\" ]" $VALUES_PATH > $VALUES_PATH.tmp
mv $VALUES_PATH.tmp $VALUES_PATH
workingDir: $(workspaces.gitrepos.path)/$(params.subdirectory)
- name: prune-built-tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3539,7 +3539,7 @@ spec:
ls -al $VALUES_PATH
BUILT_TAGS_PATH="$(cat $(workspaces.config.path)/$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH)"
echo "$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH) : $BUILT_TAGS_PATH"
yq "$BUILT_TAGS_PATH += \"$TAG_VALUE\"" $VALUES_PATH > $VALUES_PATH.tmp
yq "$BUILT_TAGS_PATH += [ \"$TAG_VALUE\" ]" $VALUES_PATH > $VALUES_PATH.tmp
mv $VALUES_PATH.tmp $VALUES_PATH
workingDir: $(workspaces.gitrepos.path)/$(params.subdirectory)
- name: prune-built-tags
Expand Down
2 changes: 1 addition & 1 deletion tests/datacenter-pipelines-naked.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3539,7 +3539,7 @@ spec:
ls -al $VALUES_PATH
BUILT_TAGS_PATH="$(cat $(workspaces.config.path)/$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH)"
echo "$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH) : $BUILT_TAGS_PATH"
yq "$BUILT_TAGS_PATH += \"$TAG_VALUE\"" $VALUES_PATH > $VALUES_PATH.tmp
yq "$BUILT_TAGS_PATH += [ \"$TAG_VALUE\" ]" $VALUES_PATH > $VALUES_PATH.tmp
mv $VALUES_PATH.tmp $VALUES_PATH
workingDir: $(workspaces.gitrepos.path)/$(params.subdirectory)
- name: prune-built-tags
Expand Down
2 changes: 1 addition & 1 deletion tests/datacenter-pipelines-normal.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3539,7 +3539,7 @@ spec:
ls -al $VALUES_PATH
BUILT_TAGS_PATH="$(cat $(workspaces.config.path)/$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH)"
echo "$(params.CONFIGMAP_PREFIX)_BUILT_TAGS_PATH) : $BUILT_TAGS_PATH"
yq "$BUILT_TAGS_PATH += \"$TAG_VALUE\"" $VALUES_PATH > $VALUES_PATH.tmp
yq "$BUILT_TAGS_PATH += [ \"$TAG_VALUE\" ]" $VALUES_PATH > $VALUES_PATH.tmp
mv $VALUES_PATH.tmp $VALUES_PATH
workingDir: $(workspaces.gitrepos.path)/$(params.subdirectory)
- name: prune-built-tags
Expand Down

0 comments on commit 448ef3d

Please sign in to comment.