Open BoyChai opened 1 month ago
You can specify a default value for each param: https://tekton.dev/docs/pipelines/tasks/#default-value
If no value is provided for that param at runtime (via TaskRun / PipelineRun) then the default value is used.
Also if you're using Tekton Triggers you can specify param values in your TriggerTemplate / TriggerBinding to avoid the need to provide them each time.
You can specify a default value for each param: https://tekton.dev/docs/pipelines/tasks/#default-value
If no value is provided for that param at runtime (via TaskRun / PipelineRun) then the default value is used.
Also if you're using Tekton Triggers you can specify param values in your TriggerTemplate / TriggerBinding to avoid the need to provide them each time.
Although default values can be used to solve the problem I raised, some Task
exist in hub.tekton.dev
, and some ordinary users may have some learning costs to modify these values. Adding the features I mentioned would be more convenient for users to use
You can also specify default values in your Pipeline, so consumers of the Pipeline do not need to be aware of the individual Task config, but can still override the values you provide if they wish.
You can also specify default values in your Pipeline, so consumers of the Pipeline do not need to be aware of the individual Task config, but can still override the values you provide if they wish.
If I set these duplicate values in the pipeline, I will need to configure certain parameters repeatedly for each of my multiple pipelines, which is too troublesome. I hope to configure the fixed values of the task task before creating the pipeline, so that the configuration of each pipeline will be very convenient for me
Feature request
It would be beneficial to introduce a
taskRef
option in the creation of a Task to facilitate the reuse of certain features of a Task where the variations may simply be one parameter, to avoid the complexity of repeatedly inputting parameters. For instance, in sending notifications, most of the server information may remain the same and the only difference would typically be the message content. Entering these parameters for every task creation is cumbersome. Of course, one can create a task with fixed values and then invoke this Task, but this approach may be too complicated for beginners. Additionally, if some tasks are installed from hub.tekton.dev, altering their YAML configurations could also necessitate an understanding of their internal purposes, thus involving a learning cost.Use case
I hope