在Jenkins管道的httprequest插件中将URL作为参数传递

时间:2018-09-18 23:31:07

标签: jenkins httprequest jenkins-plugins jenkins-pipeline

我正在尝试将URL作为参数传递给jenkins管道中的httpRequest插件,但是它无法用其值替换参数。

    httpRequest authentication: 'credauth', httpMode: 'POST', responseHandle: 'NONE', url: '${params.URL}'

    instead of ${params.URL} i also tried env.URL, ${URL}, param.URL  nothing seem to work

感谢您的帮助

1 个答案:

答案 0 :(得分:1)

对于常规变量替换,将它们括在双引号中

httpRequest身份验证:'credauth',httpMode:'POST',responseHandle:'NONE',url:“ $ {params.URL}”