从Jenkins外部调用Jenkins构建? [英] Calling a Jenkins build from outside of Jenkins?
问题描述
我是Jenkins的新手,我不确定是否可以这样做,但是我想设置一个Web界面,在此人可以单击开始作业",这将告诉Jenkins开始特定的构建作业.
I am new to Jenkins, and I'm not sure if this is possible, but I would like to set up a web interface where somebody could click "Start Job" and this will tell Jenkins to start a particular build job.
詹金斯(Jenkins)是否有允许这种事情的网络服务?如果是这样,那将是一个简单的例子吗?
Does Jenkins have a webservice that would allow such a thing? If so, what would be a simple example?
推荐答案
Here is a link to the documentation: Jenkins Remote Access API.
查看提交工作部分.
在作业配置中,您设置一个令牌,然后向JENKINS_URL/job/JOBNAME/build?token=TOKEN
创建一个POST
请求.那可能是最基本的用法.
In your job configuration you setup a token and then create a POST
request to JENKINS_URL/job/JOBNAME/build?token=TOKEN
. That's probably the most basic usage.
这篇关于从Jenkins外部调用Jenkins构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!