Configuring hudson so that only one build is executed at a time
I have 2 jobs in开发者_C百科 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?There is an option on Hudson called "# of executors", under Manage Hudson -> Configure System
Setting this option to 1 should do the trick...
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
精彩评论