diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-08-04 01:05:17 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-08-04 01:05:17 +0800 |
commit | 431792f78404c4b83aa8c962ff306f4aacd35f8b (patch) | |
tree | 0da797ce9b2e292fa79f6ecd4b35c3a2114bfdea /app | |
parent | 94b3d33de1417b31ef3994e43f901941dc302ca0 (diff) | |
download | gitlab-ce-431792f78404c4b83aa8c962ff306f4aacd35f8b.tar.gz |
Revert "We don't have to touch it because builds would touch pipeline anyway"
This reverts commit 3691a391524911a21d5af1c75cb4cd16a8a6e475.
Diffstat (limited to 'app')
-rw-r--r-- | app/services/ci/create_pipeline_service.rb | 1 | ||||
-rw-r--r-- | app/services/create_commit_builds_service.rb | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb index be91bf0db85..7a8b0683acb 100644 --- a/app/services/ci/create_pipeline_service.rb +++ b/app/services/ci/create_pipeline_service.rb @@ -27,6 +27,7 @@ module Ci end pipeline.save! + pipeline.touch unless pipeline.create_builds(current_user) pipeline.errors.add(:base, 'No builds for this pipeline.') diff --git a/app/services/create_commit_builds_service.rb b/app/services/create_commit_builds_service.rb index 5e77768abe7..0b66b854dea 100644 --- a/app/services/create_commit_builds_service.rb +++ b/app/services/create_commit_builds_service.rb @@ -53,7 +53,17 @@ class CreateCommitBuildsService return false end + save_pipeline! + end + + private + + ## + # Create a new pipeline and touch object to calculate status + # + def save_pipeline! @pipeline.save! + @pipeline.touch @pipeline end end |