@@ -141,32 +141,39 @@ spec:
141
141
project : {{ .project }}
142
142
143
143
{{- if .sources }}
144
+ {{- $refcount := 0 }}
145
+ {{ $isChart := false }}
144
146
sources :
145
- {{- range .sources }}
147
+ {{- range .sources }}
146
148
- repoURL : {{ coalesce .repoURL $.Values.global.repoURL }}
147
149
targetRevision : {{ coalesce .targetRevision $.Values.global.targetRevision }}
148
150
{{- if .chart }}
149
151
chart : {{ .chart }}
152
+ {{ $isChart = true }}
150
153
{{- else if .path }}
151
154
path : {{ .path }}
155
+ {{ $isChart = false }}
152
156
{{- else }}
153
- ref : gitref
157
+ {{ $isChart = false }}
154
158
{{- end }}
155
- {{- if and (not .kustomize) (.chart) }}
159
+ {{- if not (.chart) }}
160
+ ref : gitref{{$refcount}}
161
+ {{- end }}
162
+ {{- if and (not .kustomize) }}
156
163
helm :
157
164
ignoreMissingValueFiles : true
158
165
valueFiles :
159
- - " $gitref/values-global.yaml"
160
- - " $gitref/values-{{ $.Values.clusterGroup.name }}.yaml"
166
+ - " $gitref{{ $refcount }} /values-global.yaml"
167
+ - " $gitref{{ $refcount }} /values-{{ $.Values.clusterGroup.name }}.yaml"
161
168
{{- if $.Values.global.clusterPlatform }}
162
- - " $gitref/values-{{ $.Values.global.clusterPlatform }}.yaml"
169
+ - " $gitref{{ $refcount }} /values-{{ $.Values.global.clusterPlatform }}.yaml"
163
170
{{- if $.Values.global.clusterVersion }}
164
- - " $gitref/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.global.clusterVersion }}.yaml"
171
+ - " $gitref{{ $refcount }} /values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.global.clusterVersion }}.yaml"
165
172
{{- end }}
166
- - " $gitref/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.clusterGroup.name }}.yaml"
173
+ - " $gitref{{ $refcount }} /values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.clusterGroup.name }}.yaml"
167
174
{{- end }}
168
175
{{- if $.Values.global.clusterVersion }}
169
- - " $gitref/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml"
176
+ - " $gitref{{ $refcount }} /values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml"
170
177
{{- end }}
171
178
{{- range $valueFile := .extraValueFiles }}
172
179
- {{ $valueFile | quote }}
@@ -234,13 +241,11 @@ spec:
234
241
{{- end }}{{- /* END RANGE */}}
235
242
{{- end }} {{- /* END FILEPARAMETERS */}}
236
243
{{- end }} {{- /* IF NOT PLUGIN-ELSE */}}
237
-
238
-
239
-
240
-
244
+ {{- if not ( $isChart ) }}
245
+ {{ $refcount = add1 $refcount }}
246
+ {{- end }}
241
247
{{- end }}
242
248
{{- else }}
243
-
244
249
source :
245
250
repoURL : {{ coalesce .repoURL $.Values.global.repoURL }}
246
251
targetRevision : {{ coalesce .targetRevision $.Values.global.targetRevision }}
0 commit comments