Search in sources :

Example 16 with Pipeline

use of org.guvnor.ala.pipeline.Pipeline in project kie-wb-common by kiegroup.

the class RestPipelineServiceImpl method newPipeline.

@Override
public String newPipeline(PipelineConfig config) throws BusinessException {
    final Pipeline pipeline = PipelineFactory.newPipeline(config);
    pipelineRegistry.registerPipeline(pipeline);
    return config.getName();
}
Also used : ConfigBasedPipeline(org.guvnor.ala.pipeline.ConfigBasedPipeline) Pipeline(org.guvnor.ala.pipeline.Pipeline)

Example 17 with Pipeline

use of org.guvnor.ala.pipeline.Pipeline in project kie-wb-common by kiegroup.

the class RestPipelineServiceImpl method newPipeline.

@Override
public String newPipeline(PipelineConfig config, ProviderType providerType) throws BusinessException {
    final Pipeline pipeline = PipelineFactory.newPipeline(config);
    pipelineRegistry.registerPipeline(pipeline, providerType);
    return config.getName();
}
Also used : ConfigBasedPipeline(org.guvnor.ala.pipeline.ConfigBasedPipeline) Pipeline(org.guvnor.ala.pipeline.Pipeline)

Example 18 with Pipeline

use of org.guvnor.ala.pipeline.Pipeline in project kie-wb-common by kiegroup.

the class MockSystemPipelines method createDummyPipeline.

private Pipeline createDummyPipeline(String pipelineName) {
    final GitConfig gitConfig = new GitConfigImpl();
    final Pipeline pipeline = PipelineFactory.newBuilder().addConfigStage("GigConfig", gitConfig).buildAs(pipelineName);
    return pipeline;
}
Also used : GitConfigImpl(org.guvnor.ala.source.git.config.impl.GitConfigImpl) GitConfig(org.guvnor.ala.source.git.config.GitConfig) Pipeline(org.guvnor.ala.pipeline.Pipeline)

Example 19 with Pipeline

use of org.guvnor.ala.pipeline.Pipeline in project kie-wb-common by kiegroup.

the class BuildPipelineInitializer method initLocalBuildPipeline.

/**
 * Initializes a build pipeline based on local structures and optimizations required by the workbench.
 */
private void initLocalBuildPipeline() {
    final Pipeline localBuildPipeline = PipelineFactory.newBuilder().addConfigStage("Local Source Config", new LocalSourceConfig() {
    }).addConfigStage("Local Project Config", new LocalProjectConfig() {
    }).addConfigStage("Local Build Config", new LocalBuildConfigImpl()).addConfigStage("Local Build Exec", new LocalBuildExecConfig() {
    }).buildAs(LOCAL_BUILD_PIPELINE);
    pipelineRegistry.registerPipeline(localBuildPipeline);
}
Also used : LocalBuildConfigImpl(org.kie.workbench.common.services.backend.builder.ala.impl.LocalBuildConfigImpl) Pipeline(org.guvnor.ala.pipeline.Pipeline)

Example 20 with Pipeline

use of org.guvnor.ala.pipeline.Pipeline in project kie-wb-common by kiegroup.

the class BuildPipelineInvoker method invokeLocalBuildPipeLine.

/**
 * Invokes the local build pipeline.
 * @param buildRequest the buildRequest configures the build to perform.
 * @param consumer a consumer for getting the pipeline output.
 */
public void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest, Consumer<LocalBinaryConfig> consumer) {
    Pipeline pipe = pipelineRegistry.getPipelineByName(BuildPipelineInitializer.LOCAL_BUILD_PIPELINE);
    Input input = new Input() {

        {
            put(LocalSourceConfig.ROOT_PATH, buildRequest.getModule().getRootPath().toURI());
            put(LocalBuildConfig.BUILD_TYPE, buildRequest.getBuildType().name());
            if (buildRequest.isSingleResource()) {
                put(LocalBuildConfig.RESOURCE, encodePath(buildRequest.getResource()));
            } else {
                addResourceChanges(this, buildRequest.getResourceChanges());
            }
            if (buildRequest.getDeploymentType() != null) {
                put(LocalBuildConfig.DEPLOYMENT_TYPE, buildRequest.getDeploymentType().name());
                put(LocalBuildConfig.SUPPRESS_HANDLERS, Boolean.toString(buildRequest.isSuppressHandlers()));
            }
        }
    };
    executor.execute(input, pipe, consumer);
}
Also used : Input(org.guvnor.ala.pipeline.Input) Pipeline(org.guvnor.ala.pipeline.Pipeline)

Aggregations

Pipeline (org.guvnor.ala.pipeline.Pipeline)27 Test (org.junit.Test)15 Input (org.guvnor.ala.pipeline.Input)12 PipelineExecutor (org.guvnor.ala.pipeline.execution.PipelineExecutor)8 ArrayList (java.util.ArrayList)6 BuildRegistry (org.guvnor.ala.registry.BuildRegistry)6 InMemoryBuildRegistry (org.guvnor.ala.registry.inmemory.InMemoryBuildRegistry)6 InMemoryRuntimeRegistry (org.guvnor.ala.registry.inmemory.InMemoryRuntimeRegistry)5 Runtime (org.guvnor.ala.runtime.Runtime)5 Stage (org.guvnor.ala.pipeline.Stage)4 SourceRegistry (org.guvnor.ala.registry.SourceRegistry)4 InMemorySourceRegistry (org.guvnor.ala.registry.inmemory.InMemorySourceRegistry)4 GitConfigExecutor (org.guvnor.ala.source.git.executor.GitConfigExecutor)4 MavenBuildConfig (org.guvnor.ala.build.maven.config.MavenBuildConfig)3 MavenBuildExecConfig (org.guvnor.ala.build.maven.config.MavenBuildExecConfig)3 MavenProjectConfig (org.guvnor.ala.build.maven.config.MavenProjectConfig)3 MavenBuildConfigImpl (org.guvnor.ala.build.maven.config.impl.MavenBuildConfigImpl)3 MavenBuildExecConfigImpl (org.guvnor.ala.build.maven.config.impl.MavenBuildExecConfigImpl)3 MavenProjectConfigImpl (org.guvnor.ala.build.maven.config.impl.MavenProjectConfigImpl)3 MavenBuildConfigExecutor (org.guvnor.ala.build.maven.executor.MavenBuildConfigExecutor)3