summaryrefslogtreecommitdiff
path: root/app/models/ci/build.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r--app/models/ci/build.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index a5ced9c8264..470b97a3c0f 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -170,7 +170,8 @@ module Ci
def extract_coverage(text, regex)
begin
- matches = regex.match(text).to_a.last
+ matches = text.scan(Regexp.new(regex)).last
+ matches = matches.last if matches.kind_of?(Array)
coverage = matches.gsub(/\d+(\.\d+)?/).first
if coverage.present?