I've been reading this wiki article about the Jenkins CLI. Is there a way to rename a job through the CLI? I can't seem to find a way. An obvious workaround would be to copy a job then delete the old one, but I'm hoping there's a more straight forward way.
For what it's worth, I had to rename a larger number of jobs and was hoping on the CLI. There is no dedicated rename command. I did not try to get-job
and then push a changed version up again, maybe that would work.
I have no direct access to the Jenkins machine and thus cannot mess around on the file system, like some suggested.
I resorted to a manual approach, with some clicking - maybe this is viable workaround for others: https://.../jenkins/job/OLD-JOB-NAME/rename?newName=NEW-JOB-NAME - this will give you a "are you sure" prompt, which after confirming should rename the job.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With