use of org.jboss.pnc.model.BuildConfiguration in project pnc by project-ncl.
the class BuildExecutionTest method shouldNotContinueBuildOnMavenError.
@Test
public void shouldNotContinueBuildOnMavenError() throws ExecutorException, InterruptedException, TimeoutException {
BuildConfiguration buildConfiguration = configurationBuilder.buildFailingConfiguration(3, "build-failed-on-maven", null);
Set<BuildExecutionStatusChangedEvent> statusChangedEvents = new HashSet<>();
ObjectWrapper<BuildResult> buildExecutionResultWrapper = new ObjectWrapper<>();
runBuild(buildConfiguration, statusChangedEvents, buildExecutionResultWrapper);
checkBuildStatuses(statusChangedEvents, Arrays.asList(DONE_WITH_ERRORS, BUILD_ENV_DESTROYED, BUILD_ENV_DESTROYING));
assertNoState(statusChangedEvents, BuildExecutionStatus.COLLECTING_RESULTS_FROM_REPOSITORY_MANAGER);
}
use of org.jboss.pnc.model.BuildConfiguration in project pnc by project-ncl.
the class DatastoreMock method getLatestBuildConfigurationAudited.
@Override
public BuildConfigurationAudited getLatestBuildConfigurationAudited(Integer buildConfigId) {
BuildConfiguration buildConfig = buildConfigurations.get(buildConfigId);
int rev = buildConfigAuditedRevSequence.incrementAndGet();
BuildConfigurationAudited buildConfigurationAudited = BuildConfigurationAudited.Builder.newBuilder().buildConfiguration(buildConfig).rev(rev).build();
return buildConfigurationAudited;
}
use of org.jboss.pnc.model.BuildConfiguration in project pnc by project-ncl.
the class TestProjectConfigurationBuilder method buildConfigurationWithDependencies.
public BuildConfiguration buildConfigurationWithDependencies(BuildConfigurationSet buildConfigurationSet) {
BuildConfiguration buildConfiguration1 = build(1, "with-dependencies-1", buildConfigurationSet);
BuildConfiguration buildConfiguration2 = build(2, "with-dependencies-2", buildConfigurationSet);
BuildConfiguration buildConfiguration3 = build(3, "with-dependencies-3", buildConfigurationSet);
BuildConfiguration buildConfiguration4 = build(4, "with-dependencies-4", buildConfigurationSet);
BuildConfiguration buildConfiguration5 = build(5, "with-dependencies-5", buildConfigurationSet);
buildConfiguration1.addDependency(buildConfiguration2);
buildConfiguration1.addDependency(buildConfiguration3);
buildConfiguration2.addDependency(buildConfiguration3);
buildConfiguration2.addDependency(buildConfiguration4);
buildConfiguration3.addDependency(buildConfiguration5);
buildConfiguration4.addDependency(buildConfiguration5);
return buildConfiguration1;
}
use of org.jboss.pnc.model.BuildConfiguration in project pnc by project-ncl.
the class TestProjectConfigurationBuilder method buildConfigurationWithDependenciesThatFail.
public BuildConfiguration buildConfigurationWithDependenciesThatFail(BuildConfigurationSet buildConfigurationSet) {
BuildConfiguration buildConfiguration1 = build(1, "with-dependencies-1", buildConfigurationSet);
BuildConfiguration buildConfiguration2 = buildFailingConfiguration(2, "with-dependencies-2", buildConfigurationSet);
buildConfiguration1.addDependency(buildConfiguration2);
return buildConfiguration1;
}
use of org.jboss.pnc.model.BuildConfiguration in project pnc by project-ncl.
the class TestProjectConfigurationBuilder method build.
public BuildConfiguration build(int id, String name, BuildConfigurationSet buildConfigurationSet) {
Project project = new Project();
project.setId(id);
project.setName(name);
RepositoryConfiguration repositoryConfiguration = RepositoryConfiguration.Builder.newBuilder().id(id).internalUrl("github.com/" + name).build();
BuildConfiguration buildConfiguration = new BuildConfiguration();
buildConfiguration.setId(id);
buildConfiguration.setBuildScript(PASS);
buildConfiguration.setName(id + "");
buildConfiguration.setRepositoryConfiguration(repositoryConfiguration);
buildConfiguration.setBuildType(BuildType.MVN);
buildConfiguration.setBuildEnvironment(javaBuildEnvironment);
buildConfiguration.setProject(project);
buildConfiguration.setProject(project);
buildConfiguration.setArchived(false);
project.addBuildConfiguration(buildConfiguration);
if (buildConfigurationSet != null) {
buildConfigurationSet.addBuildConfiguration(buildConfiguration);
}
datastore.save(buildConfiguration);
return buildConfiguration;
}
Aggregations