Job restart using API (Perl or Java)
Hi all,
Is it possible to restart a failed job using API? How? TIA |
5 answers
Hi all, Hi Alex, I've pasted a sample of some Java code displaying the use of the com.buildforge.services.client.dbo.Build reprepareBuild method. You might also check out this RFE ( http://www.ibm.com/developerworks/support/rational/rfe/execute?use_case=viewChangeRequest&CR_ID=2752 ) if you are looking to select/deselect particular steps on the restart. import java.util.List; bju |
Thanks for a great reply. This seems to work , but with a problem - it skips the step that actually failed. I want to get the same behavior as in the gui - that the failed step is marked by default and is re-run.
Is that possible? |
Thanks for a great reply. This seems to work , but with a problem - it skips the step that actually failed. I want to get the same behavior as in the gui - that the failed step is marked by default and is re-run. Hi Alex, I've written a defect to have the API re-run the failed step. If you would like to follow its progress, the link is http://jazz.net/jazz08/web/projects/Rational%20Build%20Forge#action=com.ibm.team.workitem.viewWorkItem&id=17130 . bju |
Thanks for a great reply. This seems to work , but with a problem - it skips the step that actually failed. I want to get the same behavior as in the gui - that the failed step is marked by default and is re-run. Hi Alex, I've written a defect to have the API re-run the failed step. If you would like to follow its progress, the link is http://jazz.net/jazz08/web/projects/Rational%20Build%20Forge#action=com.ibm.team.workitem.viewWorkItem&id=17130 . bju Hi, I am facing a problem , some time my builds are failed by giving a simple error "build forge agent read error" or "timeout" error ,the only solution is just to restart the builds. but i dont want the manual intervention in the builds.so i wrote a script that fetches the logs and check if there is error like these(error whose solution is just to restart ) the build. now i want to restart the *SAME BUILD*, but i am not able to do so.. is there any way we can restart the builds exactly as we do in GUI(web interface) through PERL API's. |
Thanks for a great reply. This seems to work , but with a problem - it skips the step that actually failed. I want to get the same behavior as in the gui - that the failed step is marked by default and is re-run. Hi Alex, I've written a defect to have the API re-run the failed step. If you would like to follow its progress, the link is http://jazz.net/jazz08/web/projects/Rational%20Build%20Forge#action=com.ibm.team.workitem.viewWorkItem&id=17130 . bju Hi, I am facing a problem , some time my builds are failed by giving a simple error "build forge agent read error" or "timeout" error ,the only solution is just to restart the builds. but i dont want the manual intervention in the builds.so i wrote a script that fetches the logs and check if there is error like these(error whose solution is just to restart ) the build. now i want to restart the *SAME BUILD*, but i am not able to do so.. is there any way we can restart the builds exactly as we do in GUI(web interface) through PERL API's. Hi, I'll put a post under the other topic at http://jazz.net/forums/viewtopic.php?t=16283 . Brent Ulbricht Developer/Lead - RTC Build Comments
William Frontiero
commented Apr 18 '13, 12:25 p.m.
Hello Alex, I have developed a large number of java and perl api tools for Build Forge. I find it's a great utility when needing to bypass interaction with the Web UI. That being said, your use case seams to be resolved by a Build Forge System setting. Under Administration -> System in the web ui, you will find many tolerance settings for agent timeout and step retries. One in particular might resolve your issue without the need for custom tooling. Step Max Retries, this will retry a step up to the number of times supplied even if the agent timeout failed. There are also other settings to increase the timeout period for the server/agent to be more tolerant to network issues. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.