Jenkins 相关

1.获取job的config.xml文件及更改
尽量使用REST API形式(避免直接修改文件):
Use REST API instead of making changes in files.
获取某一现存的job配置文件:

curl -X GET http:///job/job_name/config.xml -u username:API_TOKEN -o mylocalconfig.xml

创建或更新job:

curl -s -XPOST 'http:///createItem?name=yourJobName' -u username:API_TOKEN --data-binary @mylocalconfig.xml -H "Content-Type:text/xml"

这种情况下不需要重启Jenkins或者再次从文件系统中读取配置文件。
ref: https://stackoverflow.com/questions/49875652/how-to-load-config-file-in-jenkins

2.使用docker容器作为Jenkins的slave
ref:[https://www.jianshu.com/p/40c7d82cb560] or
ref: [https://www.cnblogs.com/itech/p/5692218.html]

你可能感兴趣的:(Jenkins 相关)