问题
We have a hudson setup with just one executor. we want to get to a point where we can have at least 2 executors. The problem that is stopping us from doing this is a job which cannot be run in parallel.
Explanation: we have many svn branches configured on hudson. The flow for a particular branch will look like
A->B->C
In this flow, B writes and deletes data from oracle. we are good, if there is only one branch set up on hudson.
But, we have many svn branches on Hudson. So there could be a another branch with the flow
A1->B1-C1
Now B and B1 both write and delete data from the only oracle instance running on the hudson box, so we are cautious about any data getting messed up, that would be used by the tests . So we don't want to have 2 executors for hudson, which could lead to B and B1 running at the same time.
So is there a solution to this problem? Can I configure Hudson, not to run B and B1 in parallel, otherwise run two jobs in parallel?
Thanks in Advance
回答1:
What you can do is create a slave for each different project. You can call them SlaveA, SlaveB and SlaveC. Have them all launch on the same server (main hudson server) with a single executor.
Now for each branch that you have for A,A1,A2.. you can have them build only on SlaveA so that forces thread confinement between each project.
回答2:
Check the Throttle Concurrent Execution plugin. It seems to fit your use case well.
来源:https://stackoverflow.com/questions/5047278/hudson-executing-just-one-job-non-parallel