Try http://jenkins/job/foldername/createItem.
On 06.08.2013, at 17:17, Jacob Schlather <[email protected]> wrote: > I'm working on a script right now to create a new job whenever a new branch > is added to our git repo. I have the python code that will post a job, but I > would like to post a job inside a folder because our Jenkins CI is already > fairly cluttered at the moment due to the large number of projects we > currently have running. The code I currently have is: > > import requests > > xml_data=open("config_template.xml",'r').read() > headers = {'Content-Type': 'text/xml'} > jenkins_url="http://jenkins_server/createItem" > keyargs= {'params':{'name': 'TEST_JOB_2.0'}, "headers" : > headers,"auth":('user','password'),"data":xml_data} > > response=requests.post(jenkins_url,**keyargs) > > This works fine to post a job, but I couldn't find any parameters I could > pass to create it inside a folder. Is there another rest command that will > move a job to a folder that I could execute afterwards. > > -- > 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/groups/opt_out. > > -- 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/groups/opt_out.
