简体   繁体   English

从Jenkins工作中的另一个Jenkins实例上运行Jenkins作业

[英]run a Jenkins job on another Jenkins instance from the Jenkins job

I want to create a Jenkins job that starts other Jenkins jobs. 我想创建一个启动其他Jenkins作业的Jenkins作业。 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". 这很容易,因为Jenkins模板项目插件允许我们创建“使用来自另一个项目的构建器”类型的构建步骤。 However, what makes my situation harder is that I have to start Jenkins jobs on other machines. 然而,让我的情况更难的是我必须在其他机器上启动Jenkins工作。 Is there any standard way to do that? 有没有标准的方法呢?

In case you want only to trigger new build of Job You Have plenty of ways to accomplish it 如果您只想触发新建的Job,您有很多方法可以完成它

you can use remote access API and Trigger a request to build target job from source Job. 您可以使用远程访问API并触发请求以从源作业构建目标作业。

https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API 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 或者您可以使用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. 你shoukld确保两个服务器共享的ssh密钥。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM