use of com.thoughtworks.go.server.service.InstanceFactory in project gocd by gocd.
the class PipelineWithTwoStages method scheduleAndCompleteFollowingStages.
protected void scheduleAndCompleteFollowingStages(Pipeline pipeline, JobResult result) {
Stage ft = new InstanceFactory().createStageInstance(ftStage(), new DefaultSchedulingContext("anyone"), "md5-test", new TimeProvider());
ft.setOrderId(pipeline.getFirstStage().getOrderId() + 1);
dbHelper.getStageDao().saveWithJobs(pipeline, ft);
dbHelper.completeStage(ft, result);
}
Aggregations