|
|
|
[
Permlink
| « Hide
]
John Fedorkiw [28/Jun/17 03:45 PM]
..programmatically not "grammatically". We want to programmatically keep a job queued).
To do this, edit pre-queue script like below:
groovy: request.variables.timestamp = new Date().toString() This way the build request has an unique variable and will not be considered identical I do not think this solves the underlying problem.
A configuration can be set to either run concurrently or not. If it is set to run concurrently ALL queued jobs will be ran at the same time. I would like to run a subset of the queued jobs concurrently but not all of them Example: We have a configuration that mirrors data from one location to another. We use it to mirror data from <HOME> to locations <A> and <B>. I want to run mirrors from <HOME> -> <A> and <Home> -> <B> concurrently but never allow multiple runs from, <HOME> -> <A> to run at the same time. Is there a way to accomplish this ? If not can a way be added ? In the ticket I proposed we are able to programmatically determine if a job is able to run or if it should stay queued but perhaps there is another way. This can be solved with grid resource with below procedure:
1. define two resources mirrorA, and mirrorB, with ONE count respectively on some node 2. define a variable say "mirrorDestination", and prompt as "selection box", with choices as: ${groovy: def choices = ""; for (resource: com.pmease.quickbuild.entitymanager.ResourceManager.instance.getAll()) { if (resource.getName.startsWith("mirror")) choices += resource.getName() + ","; \} } 3. define node selection setting of your data mirror step to be "run on node with specified resource", and then define the resource as: ${vars.getValue("mirrorDestination")} 4. Also pass value of variable mirrorDestination to your data mirror step so that you can mirror data to desired destination |