From 58b30cc99b58657308abc266a4055d374d109058 Mon Sep 17 00:00:00 2001 From: Christian Volk Date: Thu, 17 Mar 2022 11:07:51 +0100 Subject: [PATCH] fix(golangBuild): publishing of binaries (#3643) --- pkg/config/stepmeta.go | 2 +- pkg/config/stepmeta_test.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/config/stepmeta.go b/pkg/config/stepmeta.go index e230f1574..18b2d601b 100644 --- a/pkg/config/stepmeta.go +++ b/pkg/config/stepmeta.go @@ -368,8 +368,8 @@ func (m *StepData) GetResourceParameters(path, name string) map[string]interface if res.Name == name { if val := getParameterValue(path, res, param); val != nil { resourceParams[param.Name] = val + break } - break } } } diff --git a/pkg/config/stepmeta_test.go b/pkg/config/stepmeta_test.go index c6371e6f2..eb2cf13ba 100644 --- a/pkg/config/stepmeta_test.go +++ b/pkg/config/stepmeta_test.go @@ -657,6 +657,13 @@ func TestGetResourceParameters(t *testing.T) { }}}}, expected: map[string]interface{}{"param1": "val1"}, }, + { + in: StepData{ + Spec: StepSpec{Inputs: StepInputs{Parameters: []StepParameters{ + {Name: "param1", ResourceRef: []ResourceReference{{Name: "commonPipelineEnvironment", Param: "sthwhichclearlydoesntexist"}, {Name: "commonPipelineEnvironment", Param: "envparam2"}}, Type: "string"}, + }}}}, + expected: map[string]interface{}{"param1": "val2"}, + }, } dir, err := ioutil.TempDir("", "")