func generateTemplatePatch()

in pkg/argocd/argoapplicationset_manager.go [355:378]


func generateTemplatePatch(pipeline, gitopsUrl string) string {
	template := `
    {{- if .customValues }}
    spec:
      sources:
        - ref: values
          RepoURL: %s
          targetRevision: main
        - helm:
            parameters:
              - name: image.tag
                value: '{{ .imageTag }}'
              - name: image.repository
                value: {{ .imageRepository }}
            releaseName: '{{ .codebase }}'
            valueFiles:
              - $values/%s/{{ .stage }}/{{ .codebase }}-values.yaml
          path: deploy-templates
          RepoURL: {{ .repoURL }}
          targetRevision: '{{ if eq .versionType "edp" }}build/{{ .imageTag }}{{ else }}{{ .imageTag }}{{ end }}'
    {{- end }}`

	return fmt.Sprintf(template, gitopsUrl, pipeline)
}