API支持在詹金斯(Jenkins)中手动批准升级版本吗? [英] API support for manual approval of promoted builds in Jenkins?
本文介绍了API支持在詹金斯(Jenkins)中手动批准升级版本吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以以编程方式批准詹金斯(Jenkins)晋升的建筑吗? 在作业配置中,它已设置为仅在手动批准时".
Is there any way to programmatically approve the Jenkins promoted build? In job configuration it has been set to "Only when manually approved".
推荐答案
是的!尽管我还没有找到任何文档,所以它可能不是一个稳定的解决方案.我是使用浏览器开发人员工具找到的.确保选中仅在手动批准时".
Yes! Although I haven't found any documentation for it and so it might not be a stable solution. I found this using the browser developer tools. Make sure "Only when manually approved" is checked.
这是一个例子:
curl 'https://jenkins/job/z-promotion-test/3/promotion/promotionProcess/promotion_test/promotionCondition/hudson.plugins.promoted_builds.conditions.ManualCondition/approve' --data 'json=%7B%7D&Submit=Approve'
经过认证的版本
curl 'http://<user>:<token>@jenkins/job/z-promotion-test/3/promotion/promotionProcess/promotion_test/promotionCondition/hudson.plugins.promoted_builds.conditions.ManualCondition/approve' --data 'json=%7B%7D&Submit=Approve'
请参见
- http://jenkins/me/configure
- https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API
这篇关于API支持在詹金斯(Jenkins)中手动批准升级版本吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文