-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directly access Pipeline Params from taskSpec #1879
Comments
Interesting idea...possibly related to #1185 ? |
I agree with @dibyom - @pritidesai are you able to share more details around the use case you need this for? imo embedding inside of Runs should only happen when either:
Embedding the specs reduces reuse, and like @dibyom is saying, the transition to wanting to extract the specs could be a bit rough |
Hey @bobcatfish and @dibyom, this was emerged as part of the PR discussion #1554 |
IMO if I decide to embed it's because it's something that I don't plan on reusing, or perhaps like @bobcatfish said something small or completely generated; in either case I feel that being forced to use parameters in tasks makes the yaml more verbose, harder to read and ultimately it gives up part of the advantage of embedding. |
yup agree with @bobcatfish, @dibyom, and @afrittoli, |
I guess if it's being embedded anyway we might as well let ppl use the pipeline params :( |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The request here makes sense so I'm inclined to reopen, however it seems like no one has needed it since this was originally requested? |
For the record, I recently hit this. I was assuming to be able of doing this (Use a pipeline params directly inside an embedded taskSpec). |
We can't directly use the Pipeline parameters See tektoncd/pipeline#1879
We can't directly use the Pipeline parameters See tektoncd/pipeline#1879
@VannTen - we have support for propagated parameters now which should enable this: https://github.com/tektoncd/pipeline/blob/main/docs/taskruns.md#propagated-parameters |
We can't directly use the Pipeline parameters See tektoncd/pipeline#1879
With the PR #1554, we added support to specify
taskSpec
along withpipelineSpec
so that we can embedtask
andpipeline
specifications instead of referencing them. But, there is one caveat that it leads to when it comes to accessing pipeline params since its modeled based on the waytask
andpipeline
are referenced. Ideally, we would like to directly access pipeline parameters directly instead of defining a param undertaskSpec
and then use that param. For example, task paramMESSAGE
is bound to pipeline paramMESSAGE
before referring to it inside the task script as$(inputs.params.MESSAGE)
:Can we simplify this approach and instead of declaring task parameters, allow task authors to directly use pipeline params?
The text was updated successfully, but these errors were encountered: