python-如何以编程方式在jenkins作业配置页面中设置github repo
发布时间:2020-12-16 03:23:19 所属栏目:安全 来源:网络整理
导读:我想在每次生成新的Jenkins容器时通过代码在http://host-ip:8080/job/my_project/configure jenkins页面中设置Github存储库URL. 我读到可以用python-jenkins的reconfig_job function替换config.xml来完成. 好吧,我该怎么做? 最佳答案 您在“ How can I upda
我想在每次生成新的Jenkins容器时通过代码在http://host-ip:8080/job/my_project/configure jenkins页面中设置Github存储库URL. 我读到可以用python-jenkins的reconfig_job function替换config.xml来完成. 好吧,我该怎么做? 最佳答案
您在“ How can I update a jenkins job using the api?”中有一些线索
例如,由于您生成了一个新的Jenkins容器,因此您可以 (当在git bash中运行时,OP Kostas Demiris确认in the comments可以工作) 您也可以使用Jenkins API libraries之一,但请检查是否为simple curl is enough first
updated Jenkins doc mentions(用于仅更新现有配置作业中的一个参数):
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |