|
|
|
[
Permlink
| « Hide
]
Robin Shen [03/Oct/23 10:20 PM]
You are welcome!
It works great for my case. Thank you very much, Robin!
Thank you very much, Robin! I am going to give it a try and will keep you informed.
Some example code:
import com.pmease.quickbuild.*; def configurationIdToTrigger = system.configurationManager.get("path/to/trigger_configuration").id; // parse your input variables and then loop below logic. For each loop, change newRequest.variables as necessary: def newRequest = new BuildRequest(); newRequest.configurationId = configurationIdToTrigger; newRequest.variables = ["var1":"vaule1", "var2":"value2"]; system.buildEngine.requestBuild(Context.getUser(), false, newRequest); You may create a groovy script, and in the script parse user input, and call QB api to trigger build via system.buildEngine.requestBuild. You may check how to use the requestBuild in class "TriggerBuildStep"
Thank you very much for the suggestion. There may be 10 or more executions depend on each test. I think I may not want to create 10 steps in the configuration. Is it possible to scripting the trigger the test to run the number of executions based on user's input?
Thanks, Phong You may create a separate configuration with two parallel steps triggering your parameterized configuration, and pass variables as required.
|