从Jenkins外部调用Jenkins构建? [英] Calling a Jenkins build from outside of Jenkins?

查看:119
本文介绍了从Jenkins外部调用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆