REST api to trigger a job in the build pipeline

82 views
Skip to first unread message

Ramnath Ananth

unread,
Jan 28, 2016, 12:49:45 PM1/28/16
to Jenkins Developers
Hello,

I am trying to trigger a deploy job remotely using REST api and so far I couldn't find any api which would know if the job is linked to the pipeline or not.

I want to trigger a build job A. After successful completion of job A , I want to trigger deploy job B. But there is no api to link the two jobs although I can directly trigger job B successfully.

Please can anyone help me on this.

Thanks
Ramnath

Michael Neale

unread,
Jan 29, 2016, 2:57:32 AM1/29/16
to Jenkins Developers
Hi Ramnath - do you mean that if you wire up JobA to trigger JobB you are happy to trigger JobA by REST? 
(if so, yes you can do that, but I think I misunderstand). 

Perhaps if you move this to jenkins-user list it would be better than -dev (cc me when you post and can follow up). 

Ramnath Ananth

unread,
Jan 29, 2016, 1:10:46 PM1/29/16
to Jenkins Developers
Hi Michael,

I can trigger job A and job B independently with success using REST.  For example , job A is a build job and job B is to deploy to a dev environment. 

 Job B execution is not reflected in the Jenkins UI build pipeline. (should show in green when successful, but still show in blue )

The problem is that the api doesn't know that job A is linked to job B in the pipeline  So, I would like to know what should I pass to the build api for Job B to execute successfuly  and get reflected in the UI.

I will move this to jenkins-user.

Thanks
Ramnath
Reply all
Reply to author
Forward
0 new messages