Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-02-15 11:13:14 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-02-15 11:13:14 +0300
commita065ee341c599f9500cd0b52a873cdb71a0bce55 (patch)
tree28277b71118c7f7385add7c8ae4493f1d964305b /app/services/ci
parent188c231304845ff29506dc152aaea6ec42373015 (diff)
parent1452729304393978ec93b712130dff6687db01b9 (diff)
Merge remote-tracking branch 'upstream/master' into use-update-runner-service
* upstream/master: (488 commits) Remove duplicate CHANGELOG.md entries for 8.16.5 Update CHANGELOG.md for 8.14.9 Update CHANGELOG.md for 8.15.6 #27631: Add missing top-area div to activity header page Update CHANGELOG.md for 8.16.5 Update CHANGELOG.md for 8.16.5 Update CHANGELOG.md for 8.16.5 Fix yarn lock and package.json mismatch caused by MR 9133 sync yarn.lock with recent changes to package.json Add changelog Fix z index bugs Add Links to Branches in Calendar Activity SidekiqStatus need to be qualified in some cases Replace static fixture for behaviors/requires_input_spec.js (!9162) API: Consolidate /projects endpoint Add MySQL info in install requirements Fix timezone on issue boards due date Use Gitlab::Database.with_connection_pool from !9192 Disconnect the pool after done Use threads directly, introduce pool later: ...
Diffstat (limited to 'app/services/ci')
-rw-r--r--app/services/ci/stop_environments_service.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/services/ci/stop_environments_service.rb b/app/services/ci/stop_environments_service.rb
index cf590459cb2..42c72aba7dd 100644
--- a/app/services/ci/stop_environments_service.rb
+++ b/app/services/ci/stop_environments_service.rb
@@ -8,10 +8,9 @@ module Ci
return unless has_ref?
environments.each do |environment|
- next unless environment.stoppable?
next unless can?(current_user, :create_deployment, project)
- environment.stop!(current_user)
+ environment.stop_with_action!(current_user)
end
end
@@ -22,8 +21,8 @@ module Ci
end
def environments
- @environments ||= project
- .environments_recently_updated_on_branch(@ref)
+ @environments ||=
+ EnvironmentsFinder.new(project, current_user, ref: @ref, recently_updated: true).execute
end
end
end