Search in sources :

Example 6 with MavenProjectConfigImpl

use of org.guvnor.ala.build.maven.config.impl.MavenProjectConfigImpl in project kie-wb-common by kiegroup.

the class RestPipelineEventsTest method testEventsPropagation.

@Test
public void testEventsPropagation() {
    List<PipelineConfigStage> configs = new ArrayList<>();
    configs.add(new PipelineConfigStage("GitConfig", new GitConfigImpl()));
    configs.add(new PipelineConfigStage("MavenProjectConfig", new MavenProjectConfigImpl()));
    pipelineService.newPipeline(new PipelineConfigImpl("mypipe", configs));
    Input input = new Input();
    input.put("repo-name", "drools-workshop-events");
    input.put("create-repo", "true");
    input.put("branch", "master");
    input.put("out-dir", tempPath.getAbsolutePath());
    input.put("origin", gitUrl);
    pipelineService.runPipeline("mypipe", input, false);
    assertEquals(6, listener.getEvents().size());
    assertTrue(listener.getEvents().get(0) instanceof BeforePipelineExecutionEvent);
    assertTrue(listener.getEvents().get(1) instanceof BeforeStageExecutionEvent);
    assertTrue(listener.getEvents().get(2) instanceof AfterStageExecutionEvent);
    assertTrue(listener.getEvents().get(3) instanceof BeforeStageExecutionEvent);
    assertTrue(listener.getEvents().get(4) instanceof AfterStageExecutionEvent);
    assertTrue(listener.getEvents().get(5) instanceof AfterPipelineExecutionEvent);
}
Also used : BeforePipelineExecutionEvent(org.guvnor.ala.pipeline.events.BeforePipelineExecutionEvent) Input(org.guvnor.ala.pipeline.Input) AfterStageExecutionEvent(org.guvnor.ala.pipeline.events.AfterStageExecutionEvent) PipelineConfigStage(org.guvnor.ala.pipeline.PipelineConfigStage) MavenProjectConfigImpl(org.guvnor.ala.build.maven.config.impl.MavenProjectConfigImpl) BeforeStageExecutionEvent(org.guvnor.ala.pipeline.events.BeforeStageExecutionEvent) GitConfigImpl(org.guvnor.ala.source.git.config.impl.GitConfigImpl) ArrayList(java.util.ArrayList) AfterPipelineExecutionEvent(org.guvnor.ala.pipeline.events.AfterPipelineExecutionEvent) PipelineConfigImpl(org.guvnor.ala.pipeline.impl.PipelineConfigImpl) Test(org.junit.Test)

Aggregations

MavenProjectConfigImpl (org.guvnor.ala.build.maven.config.impl.MavenProjectConfigImpl)6 Input (org.guvnor.ala.pipeline.Input)6 MavenBuildConfigImpl (org.guvnor.ala.build.maven.config.impl.MavenBuildConfigImpl)5 MavenBuildExecConfigImpl (org.guvnor.ala.build.maven.config.impl.MavenBuildExecConfigImpl)5 Test (org.junit.Test)5 GitConfigImpl (org.guvnor.ala.source.git.config.impl.GitConfigImpl)4 ArrayList (java.util.ArrayList)3 ContextAwareDockerProvisioningConfig (org.guvnor.ala.docker.config.impl.ContextAwareDockerProvisioningConfig)3 ContextAwareDockerRuntimeExecConfig (org.guvnor.ala.docker.config.impl.ContextAwareDockerRuntimeExecConfig)3 DockerBuildConfigImpl (org.guvnor.ala.docker.config.impl.DockerBuildConfigImpl)3 DockerProviderConfigImpl (org.guvnor.ala.docker.config.impl.DockerProviderConfigImpl)3 Pipeline (org.guvnor.ala.pipeline.Pipeline)3 PipelineConfigStage (org.guvnor.ala.pipeline.PipelineConfigStage)3 PipelineExecutor (org.guvnor.ala.pipeline.execution.PipelineExecutor)3 PipelineConfigImpl (org.guvnor.ala.pipeline.impl.PipelineConfigImpl)3 BuildRegistry (org.guvnor.ala.registry.BuildRegistry)3 SourceRegistry (org.guvnor.ala.registry.SourceRegistry)3 InMemoryBuildRegistry (org.guvnor.ala.registry.inmemory.InMemoryBuildRegistry)3 InMemorySourceRegistry (org.guvnor.ala.registry.inmemory.InMemorySourceRegistry)3 GitConfigExecutor (org.guvnor.ala.source.git.executor.GitConfigExecutor)3