无法使用部署到容器插件从 jenkins 部署对 Tomcat 的战争
Posted
技术标签:
【中文标题】无法使用部署到容器插件从 jenkins 部署对 Tomcat 的战争【英文标题】:Unable to deploy war on tomcat from jenkins using Deploy to container Plugin 【发布时间】:2017-04-25 23:14:35 【问题描述】:成功构建到tomcat 7后,我正在学习面部并尝试配置jenkins并部署war。但是,我能够成功创建和构建工作。我正在使用 Deploy to container Plugin 将我的 war 文件部署到 tomcat 位置,但它部署在用户文件夹中 c 驱动器的 .m2 文件夹中。
作业的控制台输出
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.433 s
[INFO] Finished at: 2016-12-10T22:13:16+05:30
[INFO] Final Memory: 17M/49M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving E:\myProj\test\trunk\web\pom.xml to com.test/web/0.0.1-SNAPSHOT/web-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving E:\myProj\test\trunk\web\target\web.war to com.er4u/web/0.0.1-SNAPSHOT/web-0.0.1-SNAPSHOT.war
channel stopped
Finished: SUCCESS
tomcat configuration in job
【问题讨论】:
【参考方案1】:这是我的日志:
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28.148s
[INFO] Finished at: Wed Jan 18 09:38:59 EST 2017
[INFO] Final Memory: 20M/192M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/lib/jenkins/jobs/kft-activiti-demo/workspace/pom.xml to me.kafeitu.demo/kft-activiti-demo/v1/kft-activiti-demo-v1.pom
[JENKINS] Archiving /var/lib/jenkins/jobs/kft-activiti-demo/workspace/target/kft-activiti-demo.war to me.kafeitu.demo/kft-activiti-demo/v1/kft-activiti-demo-v1.war
channel stopped
Deploying /var/lib/jenkins/jobs/kft-activiti-demo/workspace/target/kft-activiti-demo.war to container Tomcat 7.x Remote
Redeploying [/var/lib/jenkins/jobs/kft-activiti-demo/workspace/target/kft-activiti-demo.war]
Undeploying [/var/lib/jenkins/jobs/kft-activiti-demo/workspace/target/kft-activiti-demo.war]
Deploying [/var/lib/jenkins/jobs/kft-activiti-demo/workspace/target/kft-activiti-demo.war]
Finished: SUCCESS
【讨论】:
我可以使用这个插件部署我的战争,但如果战争已经部署在服务器上,大多数时候它无法部署战争。你能帮我解决这个问题吗? :)以上是关于无法使用部署到容器插件从 jenkins 部署对 Tomcat 的战争的主要内容,如果未能解决你的问题,请参考以下文章
Jenkins 使用 Deploy to Container 插件部署到 JBoss EAP7
如何使用 Jenkins 将 Docker 容器从 Amazon ECR 自动部署到 Kubernetes