Offer a select for Jenkins agent labels in the Pipeline editing page
Created by: LinuxSuRen
What would you like to be added: Offer a select for Jenkins agent labels in the Pipeline editing page. Please see the following screenshot:
You can get the data from this API:
GET /kapis/devops.kubesphere.io/v1alpha2/devops/rickfzhvl/jenkins/labelsdashboard/labelsData
The response could be like:
{
"status":"ok",
"data":[
{
"label":"a",
},
{
"label":"b",
}
]
}
Why is this needed: Type the agent label name manually is not reliable. Firstly, users don't know which labels they can use. Secondly, people can make mistakes by typing.
/area devops
Backend: We need a new plugin label-linked-jobs-plugin. But I've not put it into ks-jenkins. I'll leave a comment below once it's ready.