Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Build Condition to start only if no build is running #2525

nmanos ·
Hi,
I'm trying to set a simple build condition:
groovy:
logger.warn("configuration.getLatestBuild().isRunning() = " + configuration.getLatestBuild().isRunning());
return configuration.getLatestBuild().isRunning()==false;


Which should allow build to start only if configuration has no running build, but apparently the queue gets another schedule build, when there's already a running build. Agent log shows:

2013-10-01 06:46:43,473 [pool-1-thread-3144] INFO com.pmease.quickbuild.CheckConditionJob - Evaluating build condition...
2013-10-01 06:46:43,519 [pool-1-thread-3144] WARN com.pmease.quickbuild.Context - configuration.getLatestBuild().isRunning() = false
2013-10-01 06:46:47,359 [Thread-13] TRACE com.pmease.quickbuild.grid.AgentConnectivityTask - Sending heartbeat to server...
2013-10-01 06:47:14,472 [Thread-13] TRACE com.pmease.quickbuild.grid.AgentConnectivityTask - Sending heartbeat to server...
2013-10-01 06:50:46,868 [pool-1-thread-3144] INFO com.pmease.quickbuild.repositorysupport.Repository - Taking snapshot of repository 'Changelog file repository'...
2013-10-01 06:50:46,868 [pool-1-thread-3144] INFO com.pmease.quickbuild.repositorysupport.Repository - Determining head revision for repository: Changelog file repository
2013-10-01 06:50:46,872 [pool-1-thread-3144] INFO com.pmease.quickbuild.plugin.scm.perforce.PerforceRepository - Updating client spec of 'qb-ZML-DSC-QA88-8866'...
2013-10-01 06:50:46,873 [pool-1-thread-3144] INFO com.pmease.quickbuild.plugin.scm.perforce.PerforceRepository - Getting Perforce ticket...



What am I missing here ?
Thanks!
  • replies 5
  • views 2981
  • stars 0
sbloom ·
I would use the "Concurrent = no" setting in General Settings of the configuration to enforce this behavior.
robinshen ADMIN ·
Yes, disable concurrent mode is the simplest way to do this.
nmanos ·
Maybe I should rephrase my question, since disable concurrent only prevent 2 builds running simultaneously.

I want to prevent the configuration queue from adding another schedule build as a waiting build in the queue, as long as there is a running build,
so a situation of 1 running build + 1 waiting build should not occur.

Is that possible, perhaps using a script in the "pre-queue" section under "advanced settings" ?
robinshen ADMIN ·
This can not be done right now, please file an improvement request at track.pmease.com
nmanos ·
http://track.pmease.com/browse/QB-1809

Thanks!