kubesphere / kubesphere/ks-devops
How to support custom functions in kubesphere pipeline? custom function disappears after saving on Devops graphical interface
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 164
- Forks
- 140
- PR merge metrics
- No merged PRs in 30d
Description
How to support custom functions in kubesphere pipeline?
I have a custom function in the pipeline outer layer of pipeline jenkinsfile like this:
def createBuildInfo() {
return [currentBuild.fullProjectName, currentBuild.fullDisplayName, currentBuild.currentResult, currentBuild.durationString, currentBuild.getBuildCauses()[0].shortDescription, currentBuild.number]
}
pipeline {
xxxxxxxxxxxx
}
Edit the pipeline in the kubesphere Devops graphical interface. After saving, this custom function disappears. Do you not support custom functions? Or is the definition in the wrong position? The definition will report an error in pipeline {}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the pipeline edit and save flow in the KubeSphere DevOps graphical interface using the shown outer-layer custom function. Trace how the editor reads and writes the Jenkinsfile, then verify that saving preserves the function or clearly reports that custom functions are unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100