Skip to content

Commit d31ac26

Browse files
committed
simplify helm chart name logic to fix unstable behavior in build:helm:push-internal task
1 parent 831ca8d commit d31ac26

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tasks_build_helm.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ tasks:
7777
run: when_changed
7878
deps:
7979
- tools:helm
80-
- tools:yaml2json
81-
- tools:jq
8280
requires:
8381
vars:
8482
- COMPONENT
@@ -88,8 +86,7 @@ tasks:
8886
status:
8987
- 'test ! -f "{{.ROOT_DIR2}}/charts/{{.COMPONENT}}/Chart.yaml"'
9088
vars:
91-
CHART_NAME: # vars are evaluated before status, therefore the duplicated check
92-
sh: 'if [[ -f "{{.ROOT_DIR2}}/charts/{{.COMPONENT}}/Chart.yaml" ]]; then cat "{{.ROOT_DIR2}}/charts/{{.COMPONENT}}/Chart.yaml" | {{.YAML2JSON}} | {{.JQ}} -r .name; else echo -n "{{.COMPONENT}}"; fi'
89+
CHART_NAME: '{{.COMPONENT}}' # this requires the chart name to be the same as the component name
9390
cmds:
9491
- '"{{.HELM}}" push "{{.LOCALTMP}}/{{.CHART_NAME}}-{{.VERSION}}.tgz" "oci://{{.HELM_REGISTRY}}"'
9592
- 'rm -f "{{.LOCALTMP}}/{{.CHART_NAME}}-{{.VERSION}}.tgz"'

0 commit comments

Comments
 (0)