Allow CI/CD Jobs being grouped on version strings

This makes grouping on version number available. In general I'd like to
group based on MAJOR.MINOR version numbers for Gitaly.
This commit is contained in:
Zeger-Jan van de Weg 2018-03-01 12:39:30 +01:00
parent bac9bb1866
commit 4f2cdb51df
No known key found for this signature in database
GPG Key ID: 65F6A8D64A88ABAC
3 changed files with 9 additions and 2 deletions

View File

@ -141,7 +141,7 @@ class CommitStatus < ActiveRecord::Base
end
def group_name
name.to_s.gsub(%r{\d+[\s:/\\]+\d+\s*}, '').strip
name.to_s.gsub(%r{\d+[\.\s:/\\]+\d+\s*}, '').strip
end
def failed_but_allowed?

View File

@ -0,0 +1,5 @@
---
title: Allow CI/CD Jobs being grouped on version strings
merge_request:
author:
type: added

View File

@ -368,7 +368,9 @@ describe CommitStatus do
'rspec:windows 0 : / 1' => 'rspec:windows',
'rspec:windows 0 : / 1 name' => 'rspec:windows name',
'0 1 name ruby' => 'name ruby',
'0 :/ 1 name ruby' => 'name ruby'
'0 :/ 1 name ruby' => 'name ruby',
'golang test 1.8' => 'golang test',
'1.9 golang test' => 'golang test'
}
tests.each do |name, group_name|