public PipelineConfig addPipelineWithTemplate( String groupName, String pipelineName, String templateName) { CruiseConfig cruiseConfig = loadForEdit(); PipelineConfig pipelineConfig = new PipelineConfig( new CaseInsensitiveString(pipelineName), MaterialConfigsMother.mockMaterialConfigs("svn:///user:pass@tmp/foo")); pipelineConfig.setTemplateName(new CaseInsensitiveString(templateName)); cruiseConfig.findGroup(groupName).add(pipelineConfig); writeConfigFile(cruiseConfig); return pipelineConfig; }
public PipelineConfig addPipelineWithGroup( String groupName, String pipelineName, SvnCommand svnCommand, String stageName, String... buildNames) { return addPipelineWithGroupAndTimer( groupName, pipelineName, new MaterialConfigs( MaterialConfigsMother.mockMaterialConfigs(svnCommand.getUrlForDisplay())), stageName, null, buildNames); }