Great. That worked. 

Do you by chance know why my jobs would spawn as disabled rather than 
enabled?

On Tuesday, August 6, 2013 2:59:18 PM UTC-4, Daniel Beck wrote:
>
> Try http://jenkins/job/foldername/createItem. 
>
> On 06.08.2013, at 17:17, Jacob Schlather <[email protected]<javascript:>> 
> 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] <javascript:>. 
> > 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.


Reply via email to