Hello,

I want to rename jobs in Jenkins via API.
I know how to create/copy/delete jobs - but I can't rename them (like I can in 
the GUI)
Doing a copy, followed by a delete of the old job not only looses all the 
history of the job, but also doesn't update references to the thus "renamed" 
job.

I found
https://groups.google.com/forum/#!searchin/jenkinsci-users/%22I$20had$20the$20same$20question$20a$20few$20days$20ago$20and$20through$20trial$20and$20error$20and$20watching$20the$20access$20and$20error$20log$2C$20I$20found$20posting$20to$20the$20following$20URL$20worked$20for$20me.|sort:relevance|spell:true/jenkinsci-users/rgA5ViGs11g/Ualp0Ok-OcEJ

suggesting:
        Tony Chia
      6/26/12
      Hi Vincent,
      I had the same question a few days ago and through trial and error and 
watching the access and error log, I found posting to the following URL worked 
for me.

      /job/$CurrentJobName/doRename?newName=$NewJobName

      Cheers,
      Tony

But when I tried (on Jenkins 1.505) it failed this way:
      "/usr/bin/wget --auth-no-challenge --no-proxy -nv --user=XXXXX 
--password=XXXX http://foo.bar/job/JOB1/doRename?newName=JOB2": exited with 
value 8
      http://foo.bar/job/JOB1/doRename?newName=JOB2:
      2014-05-06 13:37:03 ERROR 500: Internal Server Error.

What did I do wrong ?

Regards

Martin


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to