diff options
Diffstat (limited to 'app/services/create_commit_builds_service.rb')
-rw-r--r-- | app/services/create_commit_builds_service.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/app/services/create_commit_builds_service.rb b/app/services/create_commit_builds_service.rb index 5b6fefe669e..418f5cf8091 100644 --- a/app/services/create_commit_builds_service.rb +++ b/app/services/create_commit_builds_service.rb @@ -18,23 +18,23 @@ class CreateCommitBuildsService return false end - commit = Ci::Commit.new(project: project, sha: sha, ref: ref, before_sha: before_sha, tag: tag) + pipeline = Ci::Pipeline.new(project: project, sha: sha, ref: ref, before_sha: before_sha, tag: tag) - # Skip creating ci_commit when no gitlab-ci.yml is found - unless commit.ci_yaml_file + # Skip creating pipeline when no gitlab-ci.yml is found + unless pipeline.ci_yaml_file return false end - # Create a new ci_commit - commit.save! + # Create a new pipeline + pipeline.save! # Skip creating builds for commits that have [ci skip] - unless commit.skip_ci? + unless pipeline.skip_ci? # Create builds for commit - commit.create_builds(user) + pipeline.create_builds(user) end - commit.touch - commit + pipeline.touch + pipeline end end |