Search in sources :

Example 41 with BuildConfiguration

use of org.jboss.pnc.model.BuildConfiguration in project pnc by project-ncl.

the class TestProjectConfigurationBuilder method buildConfigurationWhichDependsOnItself.

public BuildConfiguration buildConfigurationWhichDependsOnItself() {
    BuildConfiguration buildConfiguration = build(1, "depends-on-itself");
    buildConfiguration.addDependency(buildConfiguration);
    return buildConfiguration;
}
Also used : BuildConfiguration(org.jboss.pnc.model.BuildConfiguration)

Example 42 with BuildConfiguration

use of org.jboss.pnc.model.BuildConfiguration in project pnc by project-ncl.

the class TestProjectConfigurationBuilder method buildConfigurationWithCycleDependency.

public BuildConfiguration buildConfigurationWithCycleDependency(BuildConfigurationSet buildConfigurationSet) {
    BuildConfiguration buildConfiguration1 = build(1, "cycle-dependency-1", buildConfigurationSet);
    BuildConfiguration buildConfiguration2 = build(2, "cycle-dependency-2", buildConfigurationSet);
    BuildConfiguration buildConfiguration3 = build(3, "cycle-dependency-3", buildConfigurationSet);
    buildConfiguration1.addDependency(buildConfiguration2);
    buildConfiguration2.addDependency(buildConfiguration3);
    buildConfiguration3.addDependency(buildConfiguration1);
    return buildConfiguration1;
}
Also used : BuildConfiguration(org.jboss.pnc.model.BuildConfiguration)

Example 43 with BuildConfiguration

use of org.jboss.pnc.model.BuildConfiguration in project pnc by project-ncl.

the class TestProjectConfigurationBuilder method buildConfigurationToCancel.

public BuildConfiguration buildConfigurationToCancel(int id, String name) {
    BuildConfiguration buildConfiguration = build(id, name);
    buildConfiguration.setBuildScript(CANCEL);
    return buildConfiguration;
}
Also used : BuildConfiguration(org.jboss.pnc.model.BuildConfiguration)

Example 44 with BuildConfiguration

use of org.jboss.pnc.model.BuildConfiguration in project pnc by project-ncl.

the class BuildConfigurationRepositoryImplTest method shouldCreateAndUpdateBuildConfigurationWithDefaultAlignmentParams.

@Test
public void shouldCreateAndUpdateBuildConfigurationWithDefaultAlignmentParams() {
    String name = randomAlphabetic(10);
    BuildConfiguration config1 = producers.createValidBuildConfiguration(name);
    BuildConfiguration savedBC = repository.save(config1);
    assertThat(savedBC.getDefaultAlignmentParams().contains("-DversionSuffixStrip="));
    savedBC.setBuildType(BuildType.GRADLE);
    savedBC = repository.save(savedBC);
    assertThat(savedBC.getDefaultAlignmentParams().contains("-DignoreUnresolvableDependencies=true"));
}
Also used : BuildConfiguration(org.jboss.pnc.model.BuildConfiguration) Test(org.junit.Test) ContainerTest(org.jboss.pnc.test.category.ContainerTest)

Example 45 with BuildConfiguration

use of org.jboss.pnc.model.BuildConfiguration in project pnc by project-ncl.

the class BuildConfigurationRepositoryImplTest method shouldCreateBuildConfigurationWithNameOfArchivedConfiguration.

@Test
public void shouldCreateBuildConfigurationWithNameOfArchivedConfiguration() {
    String name = randomAlphabetic(10);
    BuildConfiguration archived = producers.createValidBuildConfiguration(name);
    archived.setArchived(true);
    repository.save(archived);
    repository.save(producers.createValidBuildConfiguration(name));
}
Also used : BuildConfiguration(org.jboss.pnc.model.BuildConfiguration) Test(org.junit.Test) ContainerTest(org.jboss.pnc.test.category.ContainerTest)

Aggregations

BuildConfiguration (org.jboss.pnc.model.BuildConfiguration)65 Test (org.junit.Test)23 BuildConfigurationAudited (org.jboss.pnc.model.BuildConfigurationAudited)11 HashSet (java.util.HashSet)10 BuildRecord (org.jboss.pnc.model.BuildRecord)9 Project (org.jboss.pnc.model.Project)9 BuildOptions (org.jboss.pnc.spi.BuildOptions)9 BuildResult (org.jboss.pnc.spi.BuildResult)9 Logger (org.slf4j.Logger)9 LoggerFactory (org.slf4j.LoggerFactory)9 List (java.util.List)8 Set (java.util.Set)8 Inject (javax.inject.Inject)8 ObjectWrapper (org.jboss.pnc.common.util.ObjectWrapper)8 BuildConfigurationSet (org.jboss.pnc.model.BuildConfigurationSet)8 BuildExecutionStatusChangedEvent (org.jboss.pnc.spi.events.BuildExecutionStatusChangedEvent)8 IdRev (org.jboss.pnc.model.IdRev)7 BuildSetTask (org.jboss.pnc.spi.coordinator.BuildSetTask)7 BuildTask (org.jboss.pnc.spi.coordinator.BuildTask)7 Collectors (java.util.stream.Collectors)5