diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-03-02 09:50:19 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-03-02 09:50:19 +0000 |
commit | ef74c5f5a1cee18cac1e69afaf0a472b64a5a656 (patch) | |
tree | 86ca04eefe6a26188fc10b88b1891dea219d9f54 | |
parent | f29dbaf55cc0c8a4b80c153454a2f7e22fd7a827 (diff) | |
parent | 91e6a672848f1b88e061d2fee9170ca7bd7f812e (diff) | |
download | gitlab-ce-ef74c5f5a1cee18cac1e69afaf0a472b64a5a656.tar.gz |
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
-rw-r--r-- | app/models/commit_status.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/zj-version-string-grouping-ci.yml | 5 | ||||
-rw-r--r-- | doc/ci/pipelines.md | 3 | ||||
-rw-r--r-- | spec/models/commit_status_spec.rb | 4 |
4 files changed, 11 insertions, 3 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 3469d5d795c..9fb5b7efec6 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -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? diff --git a/changelogs/unreleased/zj-version-string-grouping-ci.yml b/changelogs/unreleased/zj-version-string-grouping-ci.yml new file mode 100644 index 00000000000..04ef0f65b1e --- /dev/null +++ b/changelogs/unreleased/zj-version-string-grouping-ci.yml @@ -0,0 +1,5 @@ +--- +title: Allow CI/CD Jobs being grouped on version strings +merge_request: +author: +type: added diff --git a/doc/ci/pipelines.md b/doc/ci/pipelines.md index ac4a9b0ed27..856d7f264e4 100644 --- a/doc/ci/pipelines.md +++ b/doc/ci/pipelines.md @@ -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*`. diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb index c536dab2681..b7ed8be69fc 100644 --- a/spec/models/commit_status_spec.rb +++ b/spec/models/commit_status_spec.rb @@ -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| |