0

I have 2 jobs in my hudson.Now i want to configure my hudson in such a way that no 2 build should be executed parallely.Even if both builds are of different jobs it should not be executed in parallel.
At a time only one build (of any job) should execute and all others should go in hudson queue. How can i do so?

akshay
  • 5,235
  • 14
  • 39
  • 49
  • Hi, Did you see this post? http://stackoverflow.com/questions/5047278/hudson-executing-just-one-job-non-parallel – Tommy Aug 04 '11 at 07:35

2 Answers2

3

There is an option on Hudson called "# of executors", under Manage Hudson -> Configure System

Setting this option to 1 should do the trick...

sdmythos_gr
  • 5,444
  • 3
  • 25
  • 25
1

If there is only one node in the cluster, then setting the number of executors on that node to 1 will do the trick as another poster has mentioned. If there are multiple nodes in the cluster (maybe they are different operating systems, or something), then you need another mechanism to prevent concurrent execution. A good way to do that is via the locks and latches plugin. You name a lock and then reference it in every job. Only one job can hold a given lock at the same time. You can have multiple named locks, so this even allows you to prevent concurrent execution of a sub-group of jobs while leaving the rest of the jobs unaffected.

http://wiki.hudson-ci.org/display/HUDSON/Locks+and+Latches+plugin

Konstantin Komissarchik
  • 28,879
  • 6
  • 61
  • 61