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();
}
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();
}
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;
}
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);
}
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);
}
Aggregations