tektoncd / dashboard

A dashboard for Tekton!
Apache License 2.0
872 stars 265 forks source link

Dashboard allows drop down of tasks/pipleines, can we have multi-select also to choose multi tasks/pipelines to trigger a Run. #3193

Open martinmlouis opened 11 months ago

martinmlouis commented 11 months ago

Feature request

Dashboard allows drop down of tasks/pipleines to choose one task/pipeline to run. Can we have multi-select also to choose multiple tasks/pipelines to trigger a Run?

Use case

Use tekton CI/CD as a replacement for jenkins as a deployment tool(mostly like Openshift)

Alternatives

Additional context

AlanGreene commented 11 months ago

Hi @martinmlouis, thanks for the request. Can you provide some more details about what you're looking for? Some more specifics in the use case, maybe a concrete example or two would be helpful in understanding the request.

A TaskRun is an execution of a single Task, likewise a PipelineRun is an execution of a single Pipeline. If you want to run multiple Pipelines, you would require multiple PipelineRuns.

martinmlouis commented 11 months ago
  1. Current setup in UI is for single execution of 1 task or 1 pipeline
  2. When we deploy, we choose multiple pipelines to be executed in parallel for larger deployments sets. Tekton does have pipeline-in-a-pipeline concept where you can use a master pipeline and have multiple single pipelines in it. This is in config. We want the same concept to be available in UI, meaning a UI with
    • pipeline 1 -pipeline 2 -pipeline 3 etc in the UI visible so that I can select which ones to deploy The reason is that when we do not have a pre-ordained set of pipelines to deploy, just deploy some set of pipelines manually we need this feature. For routine automated deployments we will use the master-pipeline-with-many-worker-pipelines concept. Thanks
AlanGreene commented 11 months ago

So you're looking for a UI that allows you to select multiple Pipelines (or Tasks), and will create PipelineRuns (or TaskRuns) for each of them in parallel by pressing a single button?

How would you expect to provide params and other config required by the selected resources?

If you can provide a concrete example of these pipelines it would help to understand what options might be available.

One option I can imagine would be a utility pipeline that accepts a parameter containing a list of the Tasks / Pipelines to run, and it would be responsible for triggering the runs. This could be similar to the 'master-pipeline-with-many-worker-pipelines' you mentioned, but customisable to run only the desired subset of pipelines / tasks.

martinmlouis commented 11 months ago

How would you expect to provide params and other config required by the selected resources?

We do not intend to provide any params to the pipelines or tasks, the params and configs will be handled by the pipeline.yaml file itself Also, we can have a box for each pipeline with params and other config pre-populated or editable. As you did not respond to this request and might be thinking this ask may deviate from the accepted practices. This setup also will work for us

One option I can imagine would be a utility pipeline that accepts a parameter containing a list of the Tasks / Pipelines to run, and it would be responsible for triggering the runs. This could be similar to the 'master-pipeline-with-many-worker-pipelines' you mentioned, but customisable to run only the desired subset of pipelines / tasks.

This is what I want, but somehow selectable from UI. We do not want to type anything for pipeline-names from the UI, just a check box next to each pipeline There is a default option array param, but if I edit that field I have to manually copy and paste the pipeline-names. If you allow array param to be displayed as selectable list with checkbox next to each on that might work as well for us. We are looking for checkbox list of all pipelines - 1. configurable in the YAML file which could be the master-to-many-worker-pipeline itself 2. OR Just a list of ALL pipelines available in a namespace with a checkbox next each one.

If you are fine with a call I ca screen share and show what I would like the UI to show for us to replace jenkins

AlanGreene commented 11 months ago

As you did not respond to this request and might be thinking this ask may deviate from the accepted practices.

I'm not sure which piece I didn't respond to, I thought I had addressed your question. Can you clarify which piece I missed and I'll try to address it if still needed?

As for the second part of your response, this sounds like it could make use of https://github.com/tektoncd/community/pull/1072 if it were extended to support array params. Enum support in array params is actually called out as potential future work in that TEP. Also see https://github.com/tektoncd/pipeline/issues/7084 for some related issues and discussions for the enum feature.

If that support was available in the definition it would make sense to add to the Dashboard, and the experience you suggest with checkboxes / multiselect could be a good option for handling it.

Would you be willing to propose a TEP extending TEP-0144 to add enum support for array params? Alternatively you can reach out to the authors of the existing TEP to discuss further and see if there are other options that might work here.

  1. OR Just a list of ALL pipelines available in a namespace with a checkbox next each one.

This is very specific to your use case. There's no way for us to know that a particular param should be a list of pipelines, so I think the enum approach would be best.

martinmlouis commented 11 months ago

Thanks, I am new to proposing any solutions to tekton pipeline/UI. If it makes sense please do include it in pipeline/UI. Just wanted to have all the basic building blocks for a CI/CD in UI, this includes 1. String params 2. Array params 3. drop down lists 4. checkboxes 5. (Since I am happy to receive immediate feedback from community) I also want to say, anything Jenkins do to setup a pipeline, tekton should support it as close as possible so that we can make a case of switching to tekton in our team as well as use this powerful(very flexible) CI/CD for our k8s CI builds and deployments.

martinmlouis commented 10 months ago

Hello, since pipeline v0.54.0 is out I thought I could use enum for multi-select from dashboard. This gives me the info "enum can only be set with string type param: spec.params[message]" So, if it is a string only how can I make it into a multi-select? Shoud I wait for something else for this feature? thanks for your patience in getting this info for me, thanks

AlanGreene commented 10 months ago

The enum feature released in Pipelines v0.54 only supports string values. As I mentioned in my comment above, support for arrays was identified as potential future work but not included in this initial version.

This request is being tracked in https://github.com/tektoncd/pipeline/issues/7410

martinmlouis commented 7 months ago

Hello AlanGreene, Is it possible to speed up this feature request so that authors like me will get

AlanGreene commented 7 months ago

If you're willing / able to contribute the feature to Tekton Pipelines you can engage with the maintainers on the Pipelines issue linked above. It will need to be implemented in Tekton Pipelines before it can be used by the Dashboard. Even a comment with your use cases etc. to help illustrate the need and priority would be useful.

martinmlouis commented 1 month ago

Hello Alan, Could you please take a look at https://github.com/tektoncd/hub/issues/1979 Any help is appreciated, Thanks, Martin Lourduswamy

AlanGreene commented 1 month ago

@martinmlouis I'm not familiar with the Hub's install process or code so I think the best thing to do is to wait for the Hub maintainers to respond to your issue which I see was just opened yesterday. You can also reach out in the #hub channel on Slack.