private long rerunJob(
     String jobName,
     PipelineConfig pipelineConfig,
     Pipeline previousSuccessfulBuildWithOlderPackageConfig) {
   Stage stage =
       instanceFactory.createStageForRerunOfJobs(
           previousSuccessfulBuildWithOlderPackageConfig.getFirstStage(),
           asList(jobName),
           new DefaultSchedulingContext(),
           pipelineConfig.getFirstStageConfig(),
           new TimeProvider(),
           configHelper.getGoConfigDao().md5OfConfigFile());
   stage = stageService.save(previousSuccessfulBuildWithOlderPackageConfig, stage);
   return stage.getFirstJob().getId();
 }