diff options
Diffstat (limited to 'app/services/ci/create_pipeline_service.rb')
-rw-r--r-- | app/services/ci/create_pipeline_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb index 5bc0c31cb42..a7751b8effc 100644 --- a/app/services/ci/create_pipeline_service.rb +++ b/app/services/ci/create_pipeline_service.rb @@ -1,7 +1,7 @@ module Ci class CreatePipelineService < BaseService def execute - pipeline = project.ci_commits.new(params) + pipeline = project.pipelines.new(params) unless ref_names.include?(params[:ref]) pipeline.errors.add(:base, 'Reference not found') @@ -19,7 +19,7 @@ module Ci end begin - Ci::Commit.transaction do + Ci::Pipeline.transaction do pipeline.sha = commit.id unless pipeline.config_processor |