Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
942 views
in Technique[技术] by (71.8m points)

continuous integration - How to trigger Jenkins builds remotely and to pass parameters

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.

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

1 Answer

0 votes
by (71.8m points)

See Jenkins documentation: Parameterized Build

Below is the line you are interested in:

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
...