是否可以在主服务器上运行Job的一部分,而在从机上运行Job的另一部分? [英] Is it possible to run part of Job on master and the other part on slave?

查看:161
本文介绍了是否可以在主服务器上运行Job的一部分,而在从机上运行Job的另一部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是詹金斯的新手.我有一个要求,我需要在主节点上运行一部分工作,而其余的要在从属节点上运行.

I'm new to Jenkins. I have a requirement where I need to run part of a job on the Master node and the rest on a slave node.

我尝试在论坛上进行搜索,但找不到与此相关的任何内容.是否有可能做到这一点?

I tried searching on forums but couldn't find anything related to that. Is it possible to do this?

否则,我必须将其分为两个单独的作业.

If not, I'll have to break it into two separate jobs.

编辑

基本上,我有一份工作,可以从svn中检出源代码,然后编译并构建jar文件.之后,它将为此应用程序构建一个明智的安装程序.我想在master(Linux)上进行源代码签出和编译,并将Wise Installer的安装程序委托给Windows slave.

Basically I have a job that checks out source code from svn, then compiles and builds jar files. After that it's building a wise installer for this application. I'd like to do source code checkout and compilation on the master(Linux) and delegate Wise Installer setup to a Windows slave.

推荐答案

通过两个单独的作业显然更容易做到;您可以使主作业触发从属作业(反之亦然).

It's definitely easier to do this with two separate jobs; you can make the master job trigger the slave job (or vice versa).

如果从主版本中发布需要捆绑到安装程序中的文件作为构建工件,则可以通过Jenkins URL将它们拉到从站上并创建安装程序.使用主构建中的归档工件"后期构建步骤来完成此操作.

If you publish the files that need to be bundled into the installer as build artifacts from the master build, you can pull them onto the slave via a Jenkins URL and create the installer. Use the "Archive artifacts" post build step in the master build to do this.

这篇关于是否可以在主服务器上运行Job的一部分,而在从机上运行Job的另一部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆