diff --git a/pkg/workflow/tasks/custom/task.go b/pkg/workflow/tasks/custom/task.go index 10da34a08..1820a80f2 100644 --- a/pkg/workflow/tasks/custom/task.go +++ b/pkg/workflow/tasks/custom/task.go @@ -109,7 +109,7 @@ func (t *TaskLoader) makeTaskGenerator(templ string) (wfTypes.TaskGenerator, err if err != nil { return common.WorkflowStepStatus{}, nil, errors.WithMessagef(err, "get input from [%s]", input.From) } - if err := paramsValue.FillObject(inputValue, input.ParameterKey); err != nil { + if err := paramsValue.FillObject(inputValue, strings.Split(input.ParameterKey, ".")...); err != nil { return common.WorkflowStepStatus{}, nil, err } } diff --git a/pkg/workflow/tasks/custom/task_test.go b/pkg/workflow/tasks/custom/task_test.go index d00dc5b7e..c3faddecc 100644 --- a/pkg/workflow/tasks/custom/task_test.go +++ b/pkg/workflow/tasks/custom/task_test.go @@ -48,7 +48,7 @@ myIP: value: "1.1.1.1" return v.FillObject(ip) }, "input": func(ctx wfContext.Context, v *value.Value, act types.Action) error { - val, err := v.LookupValue("prefixIP") + val, err := v.LookupValue("set", "prefixIP") assert.NilError(t, err) str, err := val.CueValue().String() assert.NilError(t, err) @@ -87,7 +87,7 @@ myIP: value: "1.1.1.1" Type: "input", Inputs: v1beta1.StepInputs{{ From: "podIP", - ParameterKey: "prefixIP", + ParameterKey: "set.prefixIP", }}, }, {