CURL 命令在詹金斯中失败
CURL command getting failed in jenkins
我正在尝试 运行 在 jenkins 管道代码中执行以下命令
def response="curl -D- -u 'AAA:AAA' -X POST -H 'X-Atlassian-Token:nocheck' -F 'file=@${workspace}\test.txt' http://localhost:8080/rest/api/2/issue/AAA-98/
附件”
打印响应
蝙蝠“${response}”
出现以下错误,
默认响应="curl -D- -u 'AAA:AAA' -X POST -H 'X-Atlassian-Token:nocheck' -F 'file=@${workspace}\test.txt' http://localhost:8080/rest/api/2/issue/AAA-98/attachments"
打印响应
蝙蝠“${response}”
d:\jenkins\workspace\My>curl -D- -u 'AAA:AAA' -X POST -H 'X-Atlassian-Token:nocheck' -F 'file=@d:\jenkins\workspace\My est.txt' http://localhost:8080/rest/api/2/issue/AAA-98/attachments
% Total % Received % Xferd Average Speed Time Time Time 电流
下载上传总剩余速度
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0HTTP/1.1 100 继续
curl: (6) 无法解析主机: est.txt'
100 155 0 0 0 155 0 9687 --:--:-- --:--:-- --:--:-- 9687
curl: (26) 读取函数返回有趣的值
您需要转义 @${workspace}\test.txt
内的 \t
。
正确的应该是@${workspace}\test.txt
我正在尝试 运行 在 jenkins 管道代码中执行以下命令
def response="curl -D- -u 'AAA:AAA' -X POST -H 'X-Atlassian-Token:nocheck' -F 'file=@${workspace}\test.txt' http://localhost:8080/rest/api/2/issue/AAA-98/ 附件” 打印响应 蝙蝠“${response}”
出现以下错误,
默认响应="curl -D- -u 'AAA:AAA' -X POST -H 'X-Atlassian-Token:nocheck' -F 'file=@${workspace}\test.txt' http://localhost:8080/rest/api/2/issue/AAA-98/attachments" 打印响应 蝙蝠“${response}”
d:\jenkins\workspace\My>curl -D- -u 'AAA:AAA' -X POST -H 'X-Atlassian-Token:nocheck' -F 'file=@d:\jenkins\workspace\My est.txt' http://localhost:8080/rest/api/2/issue/AAA-98/attachments % Total % Received % Xferd Average Speed Time Time Time 电流 下载上传总剩余速度
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0HTTP/1.1 100 继续
curl: (6) 无法解析主机: est.txt'
100 155 0 0 0 155 0 9687 --:--:-- --:--:-- --:--:-- 9687 curl: (26) 读取函数返回有趣的值
您需要转义 @${workspace}\test.txt
内的 \t
。
正确的应该是@${workspace}\test.txt