Open haroonc opened 2 months ago
I think this is a general issue in param substitutions.
This is true for even Tasks. My guess is that we do not perform substitution of params into other params at the same level.
e.g. param substitutions of param a into defaults of param b in the TaskSpec
. I'm not sure why though 🤔.
I think the ability to say that the default
of param b
is the value of param a
is quite useful and we should be doing that.
WDYT @tektoncd/core-maintainers ?
My guess is that we do not perform substitution of params into other params at the same level. e.g. param substitutions of param a into defaults of param b in the
TaskSpec
. I'm not sure why though 🤔.
Yes, we do not perform "multi-pass" during substitution (aka a param substitution giving another param to substitute). I think there is another issue in the tracker about this as well.
Expected Behavior
Assuming StepAction has two Params,
param1
andparam2
, when a Param2 uses value of$(params.param1)
as default value, we expect it to be substituted with the value ofparam1
provided by the user.Actual Behavior
TaskRun fails with an error:
* failed to create task run pod "simple-task-run": non-existent variable in "$(params.param1)": steps[0].env[VAR2]. Maybe invalid TaskSpec
Steps to Reproduce the Problem
Apply following StepAction and TaskRun
Additional Info
Kubernetes version:
Tekton Pipeline version: