January 28, 2014

Authentication Token is required to trigger the Jenkins Jobs Remotely

This article focuses on triggering the Jenkins Job remotely in 1.499 and the issue faced when upgraded to 1.546.

With Jenkins 1.499, GET method was used to invoke the URL http://JenkinsURL/job/JOBNAME/buildWithParameters?param1=value1&param2=value2

With the latest version of Jenkins (say 1.546), the trouble started while triggering the Jenkins jobs remotely as Jenkins is looking for POST rather than GET method and giving below error message,


Further research fetched some light through the below  URL that an authentication token that needs to be passed to the Jenkins job as shown in the below screen shot and it has helped to resolve the issue.


 
So the updated URL with Authentication Token for POST method is  http://JenkinsURL/job/JOBNAME/buildWithParameters?param1=value1&param2=value2&token=build

No comments:

Post a Comment