@Test public void testFullBuildRequest() { when(buildRequest.getBuildType()).thenReturn(LocalBuildConfig.BuildType.FULL_BUILD); input = createFullBuildInput(ROOT_PATH_URI); preparePipeline(input); LocalBinaryConfig result = pipelineInvoker.invokeLocalBuildPipeLine(buildRequest); verifyPipelineInvocation(localBinaryConfig, result); }
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); }
BuildPipelineInvoker { 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); } }
BuildPipelineInvoker { 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); } BuildPipelineInvoker(); @Inject  BuildPipelineInvoker(@Named("buildPipelineExecutor") final PipelineExecutor executor,
                                final PipelineRegistry pipelineRegistry); }
BuildPipelineInvoker { 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); } BuildPipelineInvoker(); @Inject  BuildPipelineInvoker(@Named("buildPipelineExecutor") final PipelineExecutor executor,
                                final PipelineRegistry pipelineRegistry); void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest,
                                         Consumer<LocalBinaryConfig> consumer); LocalBinaryConfig invokeLocalBuildPipeLine(LocalBuildRequest buildRequest); }
BuildPipelineInvoker { 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); } BuildPipelineInvoker(); @Inject  BuildPipelineInvoker(@Named("buildPipelineExecutor") final PipelineExecutor executor,
                                final PipelineRegistry pipelineRegistry); void invokeLocalBuildPipeLine(LocalBuildRequest buildRequest,
                                         Consumer<LocalBinaryConfig> consumer); LocalBinaryConfig invokeLocalBuildPipeLine(LocalBuildRequest buildRequest);  }