1

我无法理解詹金斯奴隶的工作方式。我有一个主詹金斯和一个定义为从属的节点。我有一个 Maven 项目,我想在 slave 上运行,但在 Jenkins Master 上可以使用报告。

我应该将 Maven 安装在 Master 上还是 Slave 上,或者两者都安装?我是否将 Maven 项目保留在 Slave 或 Master 或两者上?我认为应该两者兼而有之,但我不明白为什么?

4

2 回答 2

2

When using slaves, you just have to ensure that each slave has external tools installed (Maven in your case), and properly configured (available in path, custom settings.xml if any, etc.)

To avoid having to bind a job to a unique slave, an obvious best practice is to have all your slave configured alike (i.e. all linux slaves with all needed tools, same for windows slaves, etc.)

Once all your tools are available on each slave, Jenkins takes care of running the project on an available node (master or a slave). Monitoring, log tail, build history and so on... is transparently available to the user, whatever the node used.

You don't even need to care about plugins, they are automatically available to the slaves once installed on the master.

于 2013-06-13T17:17:26.270 回答
0

我认为您不需要任何MAVEN or Jenkins从属组件。然后,当您创建从属服务器时,它为您提供了将其作为JNLP(Java Network Launch Protocol)文件启动的选项。保存此文件并将其复制到从机并启动它。唯一的先决条件是在从机上安装 JAVA。

启动时,它将与 Master 建立连接。我正在使用这样的硒网格。我不知道你的用例。这可能会有所帮助。

于 2013-09-19T09:26:34.793 回答