[英]jenkins tomcat deploy with curl won't update war file
I have a jenkins pipeline to build and deploy war file to my tomcat server我有一个 jenkins 管道来构建和部署战争文件到我的 tomcat 服务器
there is my deploy step有我的部署步骤
stage('tomcat deploy') {
sh "curl -v -u admin:admin -T target/test.war http://host:8080/manager/text/deploy?path=/test&update=true "}
it works if I don't have a war file already deployed on the server, but if it there it won't update\replace it如果我没有在服务器上部署战争文件,它可以工作,但如果它在那里它不会更新\替换它
in the logs it looks like this在日志中它看起来像这样
[Pipeline] sh
+ update=true
+ curl -v -u admin:admin -T target/test.war 'http://host:8080/manager/text/deploy?path=/test'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0[Pipeline] }
how to make it to update my war file if it's already on the server?如果它已经在服务器上,如何让它更新我的战争文件?
The &
in the URL is being interpreted by the shell rather than being included in the URL. URL 中的
&
由 shell 解释,而不是包含在 URL 中。 Escaping it as \&
should fix it. Escaping 它作为
\&
应该修复它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.