Skip to content
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

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 this issue Nov 2, 2023 · 10 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@martinmlouis
Copy link

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

@martinmlouis martinmlouis added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 2, 2023
@AlanGreene
Copy link
Member

AlanGreene commented Nov 3, 2023

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
Copy link
Author

  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
Copy link
Member

AlanGreene commented Nov 3, 2023

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
Copy link
Author

martinmlouis commented Nov 3, 2023

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
Copy link
Member

AlanGreene commented Nov 6, 2023

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 tektoncd/community#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 tektoncd/pipeline#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
Copy link
Author

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
Copy link
Author

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
Copy link
Member

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 tektoncd/pipeline#7410

@martinmlouis
Copy link
Author

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

  • array params as dropdown in Dashboard rather than string
    This helps a lots in using tekton as not only for CI/CD but also manual deployments Automation

@AlanGreene
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants