Faisal,

Thanks for your post. 

The problem you face is a very common one. When I tried to implement a fix 
for this a few year ago using Hudson, I was unable to do so using a purely 
Hudson approach. I tried various approaches, such as using build quiet 
times (as documented in the above posts). But I still was receiving the 
same errors you report. 

What I ended up doing was the following: 

1. enable scm polling in all projects (but don't schedule any polling) 
2. write an OS shell script (e.g. using bash) that uses wget to access the 
poll URL of each project in their dependency order
  for example, something like:  
    wget http://myhudsonserver:port/myjob1/poll?token=myToken
    wget http://myhudsonserver:port/myjob2/poll?token=myToken
3. create a new hudson job that calls this shell script every few minutes

The above seemed like a horrible hack at the time, but I've grown to like 
it as it makes it easy to disable all scm polling for all jobs when needed 
(e.g. we do this sometimes for short periods when doing server maintenance, 
or when doing releases of our code). Another advantage of this is I've been 
able to segregate the projects that must be built serially (e.g. small, 
quickly building framework related projects that most other projects depend 
on) from the rest of the projects (that can be built in parallel). The 
latter type projects really don't need a strict build order, but I still 
wrote a triggering script that triggers all of them (so I can stop and 
start all their polling easily as well), and another hudson job that is 
triggered once the serial jobs run and that triggers the polling of the 
parallel jobs (as this ensures the parallel jobs won't start until all the 
serial jobs are complete).  The above assumes we organize the hudson jobs 
into slaves as follows: 

serial slave (1 executor thread) runs the following jobs: 
 shell script for polling serial jobs
 serial job 1
 serial job 2
 .....
 serial job n 
 shell script for polling parallel jobs


parallel slave (several executor threads) runs the following jobs: 
 parallel job 1 
 parallel job 2
 .....
 parallel job n

In the time since I have implemented the above, I wouldn't be surprised if 
someone has found (or added) features or a plugin to hudson or jenkins that 
does the above. If so, I would love to hear about it and test it out if 
time permits. 

Brian 

On Saturday, January 12, 2013 12:12:28 PM UTC-6, Faisal Faizan wrote:
>
>
> I have exactly the same situation ....
>

Reply via email to