1

I have a single hudson job & I would like to execute the single hudson job on multiple machines, right now I gotta know that I can do it by creating my hudson job as "multi configuration job", so now with single hudson job am able to trigger it in multiple platforms simultaneously. Now, I do have another requirement, I would like to trigger single hudson job on multiple platforms with different parameters for each platform, the parameters are like username,password...which I would like to have different values for different platforms.Please let me know if any one has proper solution to it?

dilip16j
  • 11
  • 2

4 Answers4

0

maybe the best solution would be to connect multiple slaves to you Jenkins main server (Linux, Solaris, Windows..), and after that you can easily setup jobs on different platforms, good article for windows slaves https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines

and for linux is pretty straight-forward only what you actually need is ssh parameters of the slaves and that's it, afterwards you can use Jenkins in his full potential

Regard's

klerk
  • 361
  • 1
  • 3
  • 8
0

To execute on multiple platforms, you need multiple slaves on those platforms, as klerk already mentioned.

The NodeLabel Parameter plugin allows to select which node to run the job on. It even allows to select multiple nodes at once, and will trigger jobs concurrently on multiple nodes (if the job configuration allows concurrent builds).

Slav
  • 27,057
  • 11
  • 80
  • 104
  • I want to run single hudson job on multiple platforms - I can do this by setting up multiple slaves on different platforms and linking all of them to single hudson job, but my requirement is when linked all slaves to single job, i want to each slave to run with different parameters.Just want to understand how can I supply different parameters for each slave under single hudson job? – dilip16j Apr 29 '14 at 08:55
  • You can configure job parameters: select param_A, type value_1, execute on Windows slave; click build again, select param_A, type value_2, execute on Linux slave... What's the issue? Or are you trying to somehow do it automatically all at once? That was not part of the original question. – Slav Apr 29 '14 at 13:03
0

My solution was write a script as the single master job to kick off the various jobs by send a POST request with curl.exe, or any other HTTP client.

Suppose you have a worker job with 2 parameters, what you can do in your script is:

curl.exe -v -X POST --show-error 'http://yourJobURL?ParamName1=ParamValue1&ParamName2=ParamValue2

The worker job need to set the execute concurrent job as true to run multiple jobs in parallel. If you want to do something after all jobs are finished, you could write a loop in your master script, poll the status of all the jobs.

Andy Chen
  • 361
  • 2
  • 9
0

try Build Flow plugin

example:

 build("job", "parameters")

for using this 1st create one extra parameter for passing your node name. by using this plugin you can execute same job with different nodes.

mahinlma
  • 1,208
  • 3
  • 11
  • 24