Triggering a build does not work from within an RTC service
Abandoned orphaned build 'myBuild '. The build engine is about to process another build request and requires that all in-progress builds previously processed by this build engine be abandoned. Please see the build result's log for more information.
and the build log for the build definition says
This build has been automatically abandoned by the build engine 'myEngine'.
This can happen if the build engine stops while it is processing a build, or if it fails to communicate with the server (e.g. due to the server crashing, or a network break).
As a result, the build is left in the in-progress state.
Such builds are automatically abandoned for the following reasons:
1. When the build engine is restarted, new builds will be processed, however the old builds would otherwise remain in the in-progress state indefinitely.
2. As a result the build engine would appear as busy when it is not.
The used build engine is 'myEngine' is 'idle'. When I now do a 'Request Build...' or a 'Request Rebuild...' via my RTC Eclipse client, the build gets executed. I need the build to be executed directly via my RTC service, because I evaluate the build result I and only do further steps in my service if the build completed successfully, which is of course not the case if it is abandoned directly from the JBE.
Accepted answer
Comments
I have been using the method
ITeamBuildRequestService.requestAndStartBuild()
to trigger and start the build, which allows to pass the builddefinition as well as the buildengine. Now I am trying to use the method
ITeamBuildRequestService.requestBuild()
which also returns IBuildRequest object but I have currently not found a way to set the buildengine that should be used. When I try to set it directly via IBuildRequest.setHandler(), I get a ImmutablePropertyException, but when I try to generate a IBuildRequest.getWorkingCopy(), I have found no way how to save this working copy again.
When I trying to use the method
ITeamBuildRequestService.requestBuild()
without trying to set the buildengine that should be used, the build request is not picked up by the JBE.
When you request the build manually, do you need to specify an engine at request time for it to work, i.e. does the definition have any supporting engines to begin with?
Hello Nick!
Thank you very much!
Using the
requestBuild2(IBuildRequestParams)
-method without setting IBuildRequestParams.setStartBuild(true) or trying to start the requested build via
ITeamBuildRequestService.startBuild(IBuildRequest request, String[] properties) the build request was picked up and executed by my JBE.
Good to hear.