run a Jenkins job on another Jenkins instance from the Jenkins job

馋奶兔 提交于 2019-12-19 06:58:06

问题


I want to create a Jenkins job that starts other Jenkins jobs. That would be quite easy, because Jenkins Template Project Plugin allows us to create a build step of a type "use builders from another project". However, what makes my situation harder is that I have to start Jenkins jobs on other machines. Is there any standard way to do that?


回答1:


In case you want only to trigger new build of Job You Have plenty of ways to accomplish it

you can use remote access API and Trigger a request to build target job from source Job.

https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API

Or you can use https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Remote+Trigger+Plugin

which is handy in handling server details and other stuff. you shoukld ensure ssh keys shared by both servers.



来源:https://stackoverflow.com/questions/32439880/run-a-jenkins-job-on-another-jenkins-instance-from-the-jenkins-job

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!