corrected the yaml output of accesskey and secret key + added another condition to ReplacePerEnv

This commit is contained in:
pb 2025-06-16 18:21:34 +02:00
parent cd6d5a24aa
commit f5e1707545

View File

@ -71,8 +71,8 @@ type Key struct {
Bucket string `yaml:"bucket"`
EndPoint string `yaml:"endpoint"`
Insecure bool `yaml:"insecure"`
AccessKeySecret *Secret `yaml accessKeySecret`
SecretKeySecret *Secret `yaml secretKeySecret`
AccessKeySecret *Secret `yaml: accessKeySecret`
SecretKeySecret *Secret `yaml: secretKeySecret`
}
type Artifact struct {
@ -131,7 +131,7 @@ func (template *Template) CreateContainer(processing *resources.ProcessingResour
func (template *Template) ReplacePerEnv(arg string, envs []models.Param) string {
for _, v := range envs {
if strings.Contains(arg, v.Name) {
if v.Name != "" && strings.Contains(arg, v.Name) {
value := "{{ inputs.parameters." + v.Name + " }}"
arg = strings.ReplaceAll(arg, v.Name, value)
arg = strings.ReplaceAll(arg, "$"+v.Name, value)