CURL命令在詹金斯失败

时间:2018-08-20 11:56:50

标签: curl jenkins jira

我正在尝试在jenkins管道代码中运行以下命令

def response =“ curl -D- -u'AAA:AAA'-X POST -H'X-Atlassian-Token:nocheck'-F'file = @ $ {workspace} \ test.txt'{{3 }} 附件” println响应 蝙蝠“ $ {response}”

出现以下错误

def response =“ curl -D- -u'AAA:AAA'-X POST -H'X-Atlassian-Token:nocheck'-F'file = @ $ {workspace} \ test.txt'{{3 }}” println响应 蝙蝠“ $ {response}”

d:\ jenkins \ workspace \ My> curl -D- -u'AAA:AAA'-X POST -H'X-Atlassian-Token:nocheck'-F'file = @ d:\ jenkins \ workspace \我的est.txt” http://localhost:8080/rest/api/2/issue/AAA-98/   %总计%接收的%Xferd平均速度时间时间时间当前                                  Dload上传总花费左手速度

0 0 0 0 0 0 0 0-:-:--:-:--:-:-0HTTP / 1.1 100继续

卷曲:(6)无法解析主机:est.txt'

100 155 0 0 0 155 0 9687-:-:--:-:--:-:-9687 curl:(26)读取函数返回了有趣的值

1 个答案:

答案 0 :(得分:0)

您需要转义VideoCapture中的\t

正确的应该是@${workspace}\test.txt