curl http://xxx.xx.xx.xx:xxxx/jenkins/publish?fileName=${fileName}&tag_name=${tag_name}
如图调用不符合curl命令传参格式,将&改为\&如下图:
curl http://xxx.xx.xx.xx:xxxx/jenkins/publish?fileName=${fileName}\&tag_name=${tag_name}
改为如图curl可以直接在服务器调用成功,但是在Jenkins脚本还是报脚本格式错误,需要将\&改为\\&进行转义,如下图:
curl http://xxx.xx.xx.xx:xxxx/jenkins/publish?fileName=${fileName}\\&tag_name=${tag_name}