Example #1
0
 public Pipeline newPipelineWithFirstStageFailed(PipelineConfig config) throws SQLException {
   Pipeline pipeline =
       instanceFactory.createPipelineInstance(
           config,
           BuildCause.createManualForced(
               modifyOneFile(
                   MaterialsMother.createMaterialsFromMaterialConfigs(config.materialConfigs()),
                   ModificationsMother.currentRevision()),
               Username.ANONYMOUS),
           new DefaultSchedulingContext(GoConstants.DEFAULT_APPROVED_BY),
           md5,
           new TimeProvider());
   savePipelineWithStagesAndMaterials(pipeline);
   failStage(pipeline.getFirstStage());
   return pipeline;
 }
Example #2
0
 public void failStage(Stage stage) {
   failStage(stage, new Date());
 }