use of com.thoughtworks.go.server.domain.BuildComposer in project gocd by gocd.
the class BuildComposerTest method build.
private void build(String jobXml, String pipelineName, boolean fetchMaterials, boolean cleanWorkingDir) throws Exception {
BuildAssignment assignment = getAssigment(jobXml, pipelineName, fetchMaterials, cleanWorkingDir);
final BuildCommand buildCommand = new BuildComposer(assignment).compose();
buildSession = newBuildSession();
buildSession.setEnv("GO_SERVER_URL", SERVER_URL);
buildSession.build(buildCommand);
}
use of com.thoughtworks.go.server.domain.BuildComposer 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