Search in sources :

Example 6 with ProjectRef

use of org.jboss.pnc.dto.ProjectRef in project pnc by project-ncl.

the class BuildStatusChangedTest method getBuild.

private Build getBuild() {
    ProjectRef projectRef = ProjectRef.refBuilder().id("1").name("A").description("desc").projectUrl("url1").issueTrackerUrl("url2").build();
    SCMRepository scmRepository = SCMRepository.builder().id("1").internalUrl("url1").externalUrl("url2").preBuildSyncEnabled(true).build();
    Environment buildEnvironment = Environment.builder().id("1").name("jdk8").description("desc").systemImageRepositoryUrl("url").systemImageId("11").systemImageType(SystemImageType.DOCKER_IMAGE).deprecated(true).build();
    User user = User.builder().id("1").username("user").build();
    BuildConfigurationRevisionRef buildConfigurationRevisionRef = BuildConfigurationRevisionRef.refBuilder().id("1").rev(1).name("name").buildScript("true").scmRevision("awqs21").build();
    return Build.builder().project(projectRef).scmRepository(scmRepository).environment(buildEnvironment).user(user).buildConfigRevision(buildConfigurationRevisionRef).status(BuildStatus.BUILDING).buildContentId("build-42").temporaryBuild(true).build();
}
Also used : User(org.jboss.pnc.dto.User) BuildConfigurationRevisionRef(org.jboss.pnc.dto.BuildConfigurationRevisionRef) Environment(org.jboss.pnc.dto.Environment) ProjectRef(org.jboss.pnc.dto.ProjectRef) SCMRepository(org.jboss.pnc.dto.SCMRepository)

Aggregations

ProjectRef (org.jboss.pnc.dto.ProjectRef)6 Environment (org.jboss.pnc.dto.Environment)4 SCMRepository (org.jboss.pnc.dto.SCMRepository)4 BuildConfiguration (org.jboss.pnc.dto.BuildConfiguration)3 BuildConfigurationRevisionRef (org.jboss.pnc.dto.BuildConfigurationRevisionRef)2 Test (org.junit.Test)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 User (org.jboss.pnc.dto.User)1 BuildConfigurationAudited (org.jboss.pnc.model.BuildConfigurationAudited)1 IdRev (org.jboss.pnc.model.IdRev)1 BeforeMapping (org.mapstruct.BeforeMapping)1