summaryrefslogtreecommitdiff
path: root/app/models/ci
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-04-12 10:23:31 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-04-12 10:23:31 +0200
commitac50f9dddfb4555a2c356454c1cbfc1cc0b37d6d (patch)
tree39bbb7104ddbfc489fd224ccc8b9731b73f57708 /app/models/ci
parent52be9e20f9e2382f01a778d7b348283e7dd757e6 (diff)
downloadgitlab-ce-ac50f9dddfb4555a2c356454c1cbfc1cc0b37d6d.tar.gz
Fix rest of rspec and spinach tests
Diffstat (limited to 'app/models/ci')
-rw-r--r--app/models/ci/commit.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb
index d09866a4bdf..2ab1fefe8e1 100644
--- a/app/models/ci/commit.rb
+++ b/app/models/ci/commit.rb
@@ -117,7 +117,7 @@ module Ci
# get status for all prior builds
prior_builds = latest_builds.reject { |other_build| next_stages.include?(other_build.stage) }
- status = Ci::Status.get_status(prior_builds)
+ status = prior_builds.status
# create builds for next stages based
next_stages.any? do |stage|
@@ -185,7 +185,7 @@ module Ci
private
def update_status
- status =
+ self.status =
if yaml_errors.present?
'failed'
else
@@ -194,17 +194,17 @@ module Ci
end
def update_started_at
- started_at =
+ self.started_at =
statuses.minimum(:started_at)
end
def update_finished_at
- finished_at =
+ self.finished_at =
statuses.maximum(:finished_at)
end
def update_duration
- duration = begin
+ self.duration = begin
duration_array = latest.map(&:duration).compact
duration_array.reduce(:+).to_i
end