Merge branch 'zj-version-string-grouping-ci' into 'master'
Allow CI/CD Jobs being grouped on version strings See merge request gitlab-org/gitlab-ce!17455
This commit is contained in:
commit
ef74c5f5a1
4 changed files with 11 additions and 3 deletions
|
@ -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?
|
||||
|
|
5
changelogs/unreleased/zj-version-string-grouping-ci.yml
Normal file
5
changelogs/unreleased/zj-version-string-grouping-ci.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Allow CI/CD Jobs being grouped on version strings
|
||||
merge_request:
|
||||
author:
|
||||
type: added
|
|
@ -121,8 +121,9 @@ The basic requirements is that there are two numbers separated with one of
|
|||
the following (you can even use them interchangeably):
|
||||
|
||||
- a space
|
||||
- a backslash (`/`)
|
||||
- a forward slash (`/`)
|
||||
- a colon (`:`)
|
||||
- a dot (`.`)
|
||||
|
||||
>**Note:**
|
||||
More specifically, [it uses][regexp] this regular expression: `\d+[\s:\/\\]+\d+\s*`.
|
||||
|
|
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue