首先获取一个样例工程的config.xml
curl -X GET http://127.0.0.1:8080/jenkins/job/test/config.xml -u username:API_TOKEN -o mylocalconfig.xml
然后可以根据该config.xml创建多个工程
curl -s -XPOST 'http://127.0.0.1:8080/jenkins/createItem?name=yourJobName' -u username:API_TOKEN --data-binary @mylocalconfig.xml -H "Content-Type:text/xml"
Jenkins使用API创建流工程
猜你喜欢
转载自www.cnblogs.com/logo749/p/10793791.html
今日推荐
周排行