如何触发Jenkins远程构建和传递参数 [英] How to trigger Jenkins builds remotely and to pass parameters

查看:5162
本文介绍了如何触发Jenkins远程构建和传递参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下方式远程调用Jenkins作业:

  wget http:// :8080 / job / Test-Jenkins / build?token = DOIT 

code>作业被调用, DOIT 是我使用的安全令牌。



将一些参数传递给此作业的build.xml文件,即 Test-Jenkins



请参阅Jenkins文档:
请参阅Jenkins的文档:
解决方案

/wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build\">https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build



您感兴趣的行下面

  http:// server / job / myjob / buildWithParameters? = TOKEN& PARAMETER = Value 


I am invoking a Jenkins job remotely using:

wget http://<ServerIP>:8080/job/Test-Jenkins/build?token=DOIT

Here Test-Jenkins job is invoked and DOIT is the security token that I have used.

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.

解决方案

See Jenkins documentation: https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build

below the line you are interested in

http://server/job/myjob/buildWithParameters?token=TOKEN&PARAMETER=Value

这篇关于如何触发Jenkins远程构建和传递参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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