예제 #1
0
 public PipelineTemplateConfig addTemplate(
     String pipelineName, Authorization authorization, String stageName) {
   CruiseConfig cruiseConfig = loadForEdit();
   PipelineTemplateConfig templateConfig =
       PipelineTemplateConfigMother.createTemplate(
           pipelineName, authorization, StageConfigMother.manualStage(stageName));
   cruiseConfig.getTemplates().add(templateConfig);
   writeConfigFile(cruiseConfig);
   return templateConfig;
 }
 @Before
 public void setUp() throws Exception {
   pipelineConfig =
       PipelineConfigMother.pipelineConfig(
           "mingle",
           StageConfigMother.custom("dev", "defaultJob"),
           StageConfigMother.manualStage("ft"));
   pipelinePauseInfo = PipelinePauseInfo.notPaused();
   presenter =
       new PipelineHistoryJsonPresentationModel(
           pipelinePauseInfo,
           preparePipelineHistoryGroups(pipelineConfig),
           pipelineConfig,
           pagination(),
           CAN_FORCE,
           hasForceBuildCause,
           hasModification,
           true);
 }