use of com.thoughtworks.go.util.URLService in project gocd by gocd.
the class BuildAssignmentService method createBuildSettings.
private BuildSettings createBuildSettings(BuildAssignment assignment) {
// generate path only url
URLService urlService = new URLService("");
JobPlan plan = assignment.getPlan();
JobIdentifier jobIdentifier = plan.getIdentifier();
BuildSettings buildSettings = new BuildSettings();
buildSettings.setBuildId(String.valueOf(jobIdentifier.getBuildId()));
buildSettings.setBuildLocatorForDisplay(jobIdentifier.buildLocatorForDisplay());
buildSettings.setBuildLocator(jobIdentifier.buildLocator());
buildSettings.setBuildCommand(new BuildComposer(assignment).compose());
buildSettings.setConsoleUrl(urlService.getUploadUrlOfAgent(plan.getIdentifier(), getConsoleOutputFolderAndFileNameUrl()));
buildSettings.setArtifactUploadBaseUrl(urlService.getUploadBaseUrlOfAgent(plan.getIdentifier()));
buildSettings.setPropertyBaseUrl(urlService.getPropertiesUrl(plan.getIdentifier(), ""));
return buildSettings;
}
Aggregations