【发布时间】:2017-12-05 22:05:27
【问题描述】:
我正在做一个包含多个阶段的声明性管道。在其中一个阶段,我想在正在运行的 docker 上部署一个带有 tomcat 映像的 war 文件。为此,我使用命令 curl。但我总是在詹金斯上得到以下错误:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 15.7M 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (52) Empty reply from server
这是我的代码:
pipeline {
agent any
....
stage ('System test') {
steps{
bat 'docker run -d -p 9205:8080 tomcat:7.0.82'
dir('some/dir/something'){
script{
bat 'curl -T "C:/path/to/solution.war" "http://tomcat:tomcat@localhost:9205/manager/text/deploy?path=/solution.war&update=true"'
}
input 'Do you want to proceed?'
}
}
}
我已经尝试过的事情:
卷曲-L
netstat -a -p TCP -n | grep 3000(使用的端口)..查看是否没有更多的多个连接
Curl with Credentials
【问题讨论】:
标签: tomcat docker curl jenkins