@Test public void getOrUpdatePipeline() throws Exception { }
@Override public void getOrUpdatePipeline(PipelineSchemaArg arg) { PipelineSchema schema = pipelineSchemas.compute(arg.getName(), (k, old) -> { if(old == null) { old = new PipelineSchema(); } old.setName(arg.getName()); old.setRecipients(arg.getRecipients()); old.setRegistry(arg.getRegistry()); old.setFilter(arg.getFilter()); old.setPipelineStages(toStagesSchema(arg.getPipelineStages())); return old; }); checkPipeline(schema); riseEvent(schema, "create"); }
PipelineServiceImpl implements PipelineService { @Override public void getOrUpdatePipeline(PipelineSchemaArg arg) { PipelineSchema schema = pipelineSchemas.compute(arg.getName(), (k, old) -> { if(old == null) { old = new PipelineSchema(); } old.setName(arg.getName()); old.setRecipients(arg.getRecipients()); old.setRegistry(arg.getRegistry()); old.setFilter(arg.getFilter()); old.setPipelineStages(toStagesSchema(arg.getPipelineStages())); return old; }); checkPipeline(schema); riseEvent(schema, "create"); } }
PipelineServiceImpl implements PipelineService { @Override public void getOrUpdatePipeline(PipelineSchemaArg arg) { PipelineSchema schema = pipelineSchemas.compute(arg.getName(), (k, old) -> { if(old == null) { old = new PipelineSchema(); } old.setName(arg.getName()); old.setRecipients(arg.getRecipients()); old.setRegistry(arg.getRegistry()); old.setFilter(arg.getFilter()); old.setPipelineStages(toStagesSchema(arg.getPipelineStages())); return old; }); checkPipeline(schema); riseEvent(schema, "create"); } @Autowired  PipelineServiceImpl(KvMapperFactory kvmf,
                               DiscoveryStorage dockerServiceRegistry,
                               RegistryRepository registryRepository,
                               @Qualifier(PipelineEvent.BUS) MessageBus<PipelineEvent> pipelineEventBus,
                               JobsManager jobsManager,
                               @Value("${dm.pipeline.updateCronExpression:* * * * * *}") String updateCronExpression); }
PipelineServiceImpl implements PipelineService { @Override public void getOrUpdatePipeline(PipelineSchemaArg arg) { PipelineSchema schema = pipelineSchemas.compute(arg.getName(), (k, old) -> { if(old == null) { old = new PipelineSchema(); } old.setName(arg.getName()); old.setRecipients(arg.getRecipients()); old.setRegistry(arg.getRegistry()); old.setFilter(arg.getFilter()); old.setPipelineStages(toStagesSchema(arg.getPipelineStages())); return old; }); checkPipeline(schema); riseEvent(schema, "create"); } @Autowired  PipelineServiceImpl(KvMapperFactory kvmf,
                               DiscoveryStorage dockerServiceRegistry,
                               RegistryRepository registryRepository,
                               @Qualifier(PipelineEvent.BUS) MessageBus<PipelineEvent> pipelineEventBus,
                               JobsManager jobsManager,
                               @Value("${dm.pipeline.updateCronExpression:* * * * * *}") String updateCronExpression); @PostConstruct void initialize(); @Override void getOrUpdatePipeline(PipelineSchemaArg arg); @Scheduled(fixedDelay = Long.MAX_VALUE, initialDelay = 60_000) void load(); PipelineInstance createPipelineInstance(String id,
                                                   String name,
                                                   PipelineSchema pipelineSchema,
                                                   PipelineStageSchema pipelineStageName); @Override void promote(PipelinePromoteArg pipelinePromoteArg); @Override void deploy(PipelineDeployArg pipelineDeployArg); @Override void deletePipeline(String pipelineName); @Override void deleteInstance(String pipelineName); @Override Map<String, PipelineSchema> getPipelinesMap(); @Override PipelineSchema getPipeline(String pipelineId); @Override Map<String, PipelineInstance> getInstancesMap(); @Override PipelineInstance getInstance(String pipelineInstanceId); @Override Map<String, PipelineInstance> getInstancesMapByPipeline(String pipelineId); PipelineInstance getPipelineInstance(String id); PipelineSchema getPipelineSchema(String id); }
PipelineServiceImpl implements PipelineService { @Override public void getOrUpdatePipeline(PipelineSchemaArg arg) { PipelineSchema schema = pipelineSchemas.compute(arg.getName(), (k, old) -> { if(old == null) { old = new PipelineSchema(); } old.setName(arg.getName()); old.setRecipients(arg.getRecipients()); old.setRegistry(arg.getRegistry()); old.setFilter(arg.getFilter()); old.setPipelineStages(toStagesSchema(arg.getPipelineStages())); return old; }); checkPipeline(schema); riseEvent(schema, "create"); } @Autowired  PipelineServiceImpl(KvMapperFactory kvmf,
                               DiscoveryStorage dockerServiceRegistry,
                               RegistryRepository registryRepository,
                               @Qualifier(PipelineEvent.BUS) MessageBus<PipelineEvent> pipelineEventBus,
                               JobsManager jobsManager,
                               @Value("${dm.pipeline.updateCronExpression:* * * * * *}") String updateCronExpression); @PostConstruct void initialize(); @Override void getOrUpdatePipeline(PipelineSchemaArg arg); @Scheduled(fixedDelay = Long.MAX_VALUE, initialDelay = 60_000) void load(); PipelineInstance createPipelineInstance(String id,
                                                   String name,
                                                   PipelineSchema pipelineSchema,
                                                   PipelineStageSchema pipelineStageName); @Override void promote(PipelinePromoteArg pipelinePromoteArg); @Override void deploy(PipelineDeployArg pipelineDeployArg); @Override void deletePipeline(String pipelineName); @Override void deleteInstance(String pipelineName); @Override Map<String, PipelineSchema> getPipelinesMap(); @Override PipelineSchema getPipeline(String pipelineId); @Override Map<String, PipelineInstance> getInstancesMap(); @Override PipelineInstance getInstance(String pipelineInstanceId); @Override Map<String, PipelineInstance> getInstancesMapByPipeline(String pipelineId); PipelineInstance getPipelineInstance(String id); PipelineSchema getPipelineSchema(String id);  }