前提:jenkins支持遠程調用(具體設置自行百度)
1、在我的個人中心--configure--API TOKEN--如果沒有,則添加一個token,並生成,再復制並記錄下來
2、在你的job上面加上你的用戶名和token即可
具體curl用法自行百度
例如:
http://userName:token@url
http://zhangsan:sdfa3431sdf@test.jenkins.com/build/
最終:
curl -d "a=1" http://zhangsan:sdfa3431sdf@test.jenkins.com/build/