I am using the following code to create a job in jenkinsapi
from jenkinsapi.jenkins import *
from jenkinsapi.job import *
import os.path
import urllib2
jenkin = Jenkins('http://hudsonserver','hudson','hudson')
file0=open("data.log")
file1=open("full.log")
myJob = Job("http://hudsonserver/job/LTT_JOB/","LTT_JOB", jenkin)
parameters = {"data.log":file0,"full.log":file1,"REQUESTER_EMAIL_ID":"test@test.com"}
print myJob.get_last_buildnumber()
myJob.invoke('check',False,False,3,15,parameters)
In invoke () call, I use the 'check' token. It appears that the call fails due to the presentation of parameter parameters. Can someone tell if the following representation for parameters is correctly specified?
parameters = {"data.log":file0,"full.log":file1,"REQUESTER_EMAIL_ID":"test@test.com"}
I would be very helpful if anyone could point out examples written with jenkinsapi
source
share