result.setResult( "Project [" + projectName + "] does not exist" );
jobResultEvent.fire( result );
return;
}
BuildResults buildResults = null;
try {
buildResults = buildService.buildAndDeploy( project );
result.setDetailedResult( buildResults == null ? null : deployResultToDetailedStringMessages( buildResults ) );
result.setStatus( buildResults.getErrorMessages().isEmpty() ? JobStatus.SUCCESS : JobStatus.FAIL );
} catch ( Throwable t ) {
List<String> errorResult = new ArrayList<String>();
errorResult.add( t.getMessage() );
result.setDetailedResult( errorResult );
result.setStatus( JobStatus.FAIL );