summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/build.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 92327bdb08d..77a2dec4f72 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -290,6 +290,10 @@ module Ci
end
def can_be_served?(runner)
+ if tag_list.empty? && !runner.run_untagged?
+ return false
+ end
+
(tag_list - runner.tag_list).empty?
end