简体   繁体   English

Jenkins在构建后操作后运行构建后步骤

[英]Jenkins run post-build step after post-build action

I need jenkins to bounce a remote tomcat server after the war is deployed. 部署战争后,我需要jenkins来反弹远程tomcat服务器。 We have the tomcat restart configured as a post-build step (shell command) and the war deploy configured as a post-build action. 我们将tomcat重新启动配置为构建后步骤(shell命令),并将war部署配置为构建后操作。

Everything is working but we need jenkins to restart the tomcat server (run the shell script) after it deploys the war. 一切正常,但我们需要jenkins在部署战争后重启tomcat服务器(运行shell脚本)。

Is there a way to add a post-build step after a post-build action in Jenkins? 有没有办法在Jenkins的后构建操作后添加后构建步骤?

We do this by segregating our build and deployment jobs. 我们通过隔离构建和部署作业来实现此目的。 Our "Builds" do just that, they build and archive artifacts. 我们的“构建”就是这样做的,它们构建和存档工件。 We have downstream jobs that pick up those artifacts for deployment/installation and will then restart any necessary services. 我们有下游作业,可以获取这些工件以进行部署/安装,然后重新启动任何必要的服务。

So in the deployment/installation job, the installation would be a build step, and the restart could be an additional build step, or a post-build action. 因此,在部署/安装作业中,安装将是构建步骤,重新启动可能是额外的构建步骤或构建后操作。

难道你不能只进行第二次构建后动作吗?

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

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