History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-4032
Type: Task Task
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Robin Shen
Reporter: Phong Trinh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Wait for trigger to be done.

Created: 10/Oct/23 05:52 PM   Updated: 23/Dec/23 01:10 AM
Component/s: None
Affects Version/s: 12.0.19
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
 Hi Robin/Support Team,
 I created a QB step to run the following groovy script to trigger a configuration:
================================================================================
import com.pmease.quickbuild.*;
def configurationIdToTrigger = system.configurationManager.get("path/to/trigger_configuration").id;
def vars = '1.0,1.1,1.2'
def newRequest = new BuildRequest();
newRequest.configurationId = configurationIdToTrigger;
def arrayVars = vars.split(',');
def var1
for(int nLoop = 0; nLoop < arrayVars.length; nLoop++) {
 var1 = arrayVar[nLoop]
 newRequest.variables = ["var1":var1, "var2":"value2"];
 system.buildEngine.requestBuild(Context.getUser(), false, newRequest);
}
============================================================================
 Is there any way that this step can wait for the configuration to finish which is similar to 'Wait For Finishing' when creating 'Trigger Other Builds'?

 Thanks,
ptrinh

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [10/Oct/23 11:26 PM]
Please check QB source TriggerBuildStep.java. It checks build status periodically to wait for its completion. You may transtate that logic into groovy in your script.

Phong Trinh [11/Oct/23 06:50 PM]
Thanks, Robin!