使用Jenkins将战争部署到tomcat 8
我想简单地在远程tomcat上部署jenkins从站上存在的war文件。使用Jenkins将战争部署到tomcat 8
我认为这个插件是非常有用的https://wiki.jenkins.io/display/JENKINS/Deploy+Plugin
控制台输出如下:
Building remotely on temporary node (temporary) in workspace /home/ubuntu/workspace/container
[] $ /bin/sh -xe /tmp/jenkins6494228973021674867.sh
Performing Post build task...
Match found for : : True
Logical operation result is TRUE
Running script : echo "running post build task"
[ifx-pre-jill] $ /bin/sh -xe /tmp/jenkins194585219316925654.sh
+ echo running post build task
running post build task
POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 0
Finished: SUCCESS
我看不到日志进行部署。我错过了什么吗?
我试过引用这个https://www.jdev.it/deploying-your-war-file-from-jenkins-to-tomcat/,但它没有给我选择输入管理员用户名和密码的选项。所以,我作为证书输入了tomcat实例的ssh公钥位置。
您可以使用cURL
将WAR文件部署到Tomcat。
curl -T "app.war" "http://managerUser:[email protected]://<TOMCAT_URL>/manager/text/deploy?path=/appContext&update=true"
'curl -T“test.war”“http:// tomcat:[email protected]:8080/manager/text/deploy?path =/test&update = true”-v' ''' * Trying 192.168 .248.190 ... *连接到192.168.248.190(192.168.248.190)端口8080(#0) *服务器认证使用基本用户'tomcat' > PUT/manager/deploy?path =/test HTTP/1.1 >主持人:192.168.248.190:8080 >授权:基本dG9tY2 == >的User-Agent:卷曲/ 7.47.0 >接受:*/* >的Content-Length:374778991 >期望:100继续 >
那么,你能打开你的tomcat管理页面吗?'http://192.168.248.190:8080/manager/html'? – ANIL
我觉得这个插件还不支持Tomcat 8.x。 – ANIL
我甚至为Tomcat 7试过这个,但是我看不到日志来知道它是否正在执行。 – user3288346
您可以通过使用shell脚本来执行此操作,而无需使用此插件。 – ANIL