jenkins-cli icon indicating copy to clipboard operation
jenkins-cli copied to clipboard

jcli job edit for multibranch pipeline jobs

Open natsen opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. jcli job edit is non functional for multibranch pipeline. This is because the job is sourced from a Jenkinsfile in SCM. Describe the solution you'd like jcli job edit can provide an option to edit and run the job using the replay api for jobs that are sources from Jenkinsfile in SCM.

natsen avatar Jan 06 '22 20:01 natsen

jcli job edit does edit the multibranch pipeline by changing Pipeline Definition in the configuration for the branch from "Pipeline from multbrach configuration" to "Pipeline script". This is great. One thing I observed though is edit and build option fails with 400 error. I will create a different bug for that. Will close this. jcli job edit -b "mutibranch-job branch" -f mypipeline.groovy fails with 400 error. This might be because the job expects parameters. edit and build doesn't ask for parameters.

natsen avatar Feb 04 '22 01:02 natsen

although jcli edit multibranch pipeline provides an option to run any pipeline script, it does not have ability to edit currently pipeline script sourced from Jenkinsfile in SCM. Keeping this open.

natsen avatar Feb 22 '22 19:02 natsen