Open QuanZhang-William opened 1 year ago
Could you please add enum feature with array values support? It currently supports string only. This is must if we switch from jenkins UI to tekton UI for deployment. All is good for Continuous Delivery but for Continuous Deployment we need this, please help
Hi @martinmlouis 👋 , thanks for the feedback.
When designing the TEP, we left the enum
support for array
param to future work since the use cases was not clear to us (e.g. how do we validate an array against an allowlist, do we need the enum to be an array of arr? ).
If you have a clear use case of enum
for array
param, we can definitely extend the TEP to support it!
Is https://github.com/tektoncd/dashboard/issues/3193 your usecase? I was going through the discussion and it is still not clear how can an enum
for array param type can help. But I'm happy to chat more about it.
Yes, my use case for this feature is checkboxes for pipelines selection for CD. I just need to choose the pipelines from a list of pipelines either by - single select AND - multi select or - checkboxes. Concept copied from use of jenkins UI. How you implement it is upto the authors, Thanks
If I'm understanding correctly, in terms of validation, for the use case debscribed the values in the array would each be validated against the allowed values specified by the enum. It would not require arrays of arrays.
Can you see if this can be one of many priorities for next pipeline/dashboard release? I am a user of tekton CI/CD authoring task/pipeline, so I hope to answer your questions from a user perspective.
cc @tektoncd/core-collaborators @tektoncd/core-maintainers
So one remark, missing piece is support of enum in objects, something like the following.
params:
- name: go
description: >-
Golang options, such as flags, …
type: object
properties:
version:
type: string
enum: ["1.19", "1.20", "1.21", "1.22"]
GOFLAGS: {type: string}
GOOS: {type: string}
GOARCH: {type: string}
CGO_ENABLED: {type: string}
default:
version: "1.21"
GOFLAGS: "-v"
GOOS: ""
GOARCH: ""
CGO_ENABLED: "0"
I'll create an issue about it.
Hello tekton CI/CD, Is it possible to speed up this feature request so that authors like me will get
Feature looking for Promotion
Promote
Param Enum
feature tobeta
.Param.Enum
allows resource authors to pre define a set of allowed values for aparam
and provides a built-in mechanism to perform param input value. This feature is guarded by dedicated feature flagenable-param-enum
(setting it totrue
to experiment the feature).Current Feature Version
alpha
Raise Feature Version
beta
Pipeline Release
v0.54
Issues Reported by the Users
Implementation PRs