summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-11-05 11:45:36 +0000
committerTim Zallmann <tzallmann@gitlab.com>2018-11-05 11:45:36 +0000
commit425ddcc5a8f65b44546daa8c1885e4e4f45e5f32 (patch)
tree686da2eb8ee8755f7e1bcd7a91c61559638fe547 /app/models
parent2ae6c47ddd27d9f76bc2e4326e91fc8d272896c1 (diff)
parent13c091c443502a6824b78c4e93637b3fc794a47c (diff)
downloadgitlab-ce-425ddcc5a8f65b44546daa8c1885e4e4f45e5f32.tar.gz
Merge branch 'scheduled-manual-jobs-environment-play-buttons' into 'master'
Add the Play button for delayed jobs in environment page Closes #52129 See merge request gitlab-org/gitlab-ce!22106
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/build.rb6
-rw-r--r--app/models/deployment.rb6
2 files changed, 10 insertions, 2 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index bb5d52fc78d..600c562d05a 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -245,10 +245,14 @@ module Ci
.fabricate!
end
- def other_actions
+ def other_manual_actions
pipeline.manual_actions.where.not(name: name)
end
+ def other_scheduled_actions
+ pipeline.scheduled_actions.where.not(name: name)
+ end
+
def pages_generator?
Gitlab.config.pages.enabled &&
self.name == 'pages'
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index ee5b96e7454..37efbb04fce 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -55,7 +55,11 @@ class Deployment < ActiveRecord::Base
end
def manual_actions
- @manual_actions ||= deployable.try(:other_actions)
+ @manual_actions ||= deployable.try(:other_manual_actions)
+ end
+
+ def scheduled_actions
+ @scheduled_actions ||= deployable.try(:other_scheduled_actions)
end
def includes_commit?(commit)