如何从 Jenkins 开始 JBoss?

How to start JBoss from Jenkins?

有人知道如何在部署前从 Jenkins 启动 JBoss 吗? 我需要在部署前检查 Jboss 是否 运行ning。

如果有人能帮助解决这个问题,我将不胜感激!

嗯,

我已尝试遵循 Gerold Broser 的建议。

所以,我已经安装了 JBoss 管理插件和条件构建步骤插件。

之后在管理 Jenkins/Configure System/JBoss Managment Builder - 我添加了一个远程服务器。

并且在 Project/Configure/Build/Add 构建 step/Conditional 步骤(单个)中 - 我已经尝试过:

运行? 布尔条件

令牌 pgrep -f jboss < /dev/null

评估失败不要运行

建设者Jboss管理

操作 - 开始。

Save/Apply

参见JBoss Management Plugin

This plugin allows to manage a JBoss Application Server during build procedure.

With the plugin we can start/stop JBoss AS.

要检查它是否 运行 请参阅 How to check if JBoss is running on Unix server? 并有条件地部署:

  • 使用 Conditional BuildStep Plugin 并将您选择的脚本变体添加到:

    构建条件步骤(单)→运行? 执行shell→命令

  • Select 高级... → 评估失败:不要运行

  • Select 构建器:...您的部署构建步骤...