如何远程触发 Jenkins 构建并传递参数 [英] How to trigger Jenkins builds remotely and to pass parameters
本文介绍了如何远程触发 Jenkins 构建并传递参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在远程调用 Jenkins 作业:
I am invoking a Jenkins job remotely using:
wget http://<ServerIP>:8080/job/Test-Jenkins/build?token=DOIT
这里 Test-Jenkins
作业被调用,DOIT
是我使用的安全令牌.
Here Test-Jenkins
job is invoked and DOIT
is the security token that I have used.
现在我需要将一些参数传递给该作业的 build.xml 文件,即 Test-Jenkins
.
Now I need to pass some parameters to the build.xml file of this job i.e. Test-Jenkins
.
我还没有弄清楚如何传递变量.
I have not yet figured out how to pass the variables yet.
推荐答案
参见 Jenkins 文档:参数化构建
See Jenkins documentation: Parameterized Build
下面是您感兴趣的行:
http://server/job/myjob/buildWithParameters?token=TOKEN&PARAMETER=Value
这篇关于如何远程触发 Jenkins 构建并传递参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文