Build result kjm_test_snapshot2 does not have a "start" request
I create a build def using the java api
I create a build result using the java api When I display the build result using the eclipse client it displays correctly, bu I see this this error in the error log. How do I fix this this problem? Do I have to create a start request, how would I do that? IBuildDefinition buildDef = BuildItemFactory.createBuildDefinition(projectArea); IBuildResult result = BuildItemFactory.createBuildResult(buildDef); ITeamBuildClient buildClient = (ITeamBuildClient) repo.getClientLibrary(ITeamBuildClient.class); buildClient.save(result,MONITOR); |
One answer
Add a build request and the error goes away, this require the the build definition to have a build engine
ITeamBuildRequestClient requestClient = (ITeamBuildRequestClient) repo.getClientLibrary(ITeamBuildRequestClient.class); IBuildRequest buildRequest = requestClient.requestBuild(buildDef, true, MONITOR); IBuildResultHandle buildResultHandle = buildRequest.getBuildResult(); IBuildResult result_real = (IBuildResult)repo.itemManager().fetchCompleteItem(buildResultHandle,IItemManager.DEFAULT, MONITOR); IBuildResult result = (IBuildResult) result_real.getWorkingCopy(); |
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.