jenkins 使用curl调用时带文件参数

最近在使用jenkins时,需要使用curl去调用,但原有的jenkins中需要有file参数,baidu查询之未找到。

特意记录下

curl -X POST  http://localhost:8080/job/builder/build \
             --form attachedfile=@c:/1.txt \
             --form json='{"parameter": [{"name":"RECORDS_LIST", "file":"attachedfile"}]}'

猜你喜欢

转载自www.cnblogs.com/landhu/p/9150841.html