summaryrefslogtreecommitdiff
path: root/lib/ci
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ci')
-rw-r--r--lib/ci/api/builds.rb2
-rw-r--r--lib/ci/api/helpers.rb8
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb
index 54db63d4628..59f85416ee5 100644
--- a/lib/ci/api/builds.rb
+++ b/lib/ci/api/builds.rb
@@ -27,7 +27,7 @@ module Ci
else
Gitlab::Metrics.add_event(:build_not_found)
- not_found!
+ build_not_found!
end
end
diff --git a/lib/ci/api/helpers.rb b/lib/ci/api/helpers.rb
index 411e0dea15e..3dfebc0cac1 100644
--- a/lib/ci/api/helpers.rb
+++ b/lib/ci/api/helpers.rb
@@ -40,6 +40,14 @@ module Ci
end
end
+ def build_not_found!
+ if headers['User-Agent'].match(/gitlab-ci-multi-runner \d+\.\d+\.\d+(~beta\.\d+\.g[0-9a-f]+)? /)
+ no_content!
+ else
+ not_found!
+ end
+ end
+
def current_runner
@runner ||= Runner.find_by_token(params[:token].to_s)
end