Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8c665d9b
Commit
8c665d9b
authored
Feb 02, 2022
by
Nourdin el Bacha
Committed by
Evan Read
Feb 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document precedence of coverage regex
parent
80ed9b2d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
doc/ci/pipelines/settings.md
doc/ci/pipelines/settings.md
+17
-7
doc/ci/yaml/index.md
doc/ci/yaml/index.md
+2
-0
No files found.
doc/ci/pipelines/settings.md
View file @
8c665d9b
...
...
@@ -211,15 +211,25 @@ averaged.
To define a coverage-parsing regular expression:
-
In the GitLab UI:
-
Using the project's
`.gitlab-ci.yml`
, provide a regular expression using the
[
`coverage`
](
../yaml/index.md#coverage
)
keyword. Setting the regular expression this way takes precedence over the project's CI/CD settings.
-
Using the Project's CI/CD settings:
-
Set using the GitLab UI:
1. On the top bar, select **Menu > Projects** and find your project.
1. On the left sidebar, select **Settings > CI/CD**.
1. Expand **General pipelines**.
1. In the **Test coverage parsing** field, enter a regular expression. Leave blank to disable this feature.
-
Using the project's
`.gitlab-ci.yml`
, provide a regular expression using the
[
`coverage`
](
../yaml/index.md#coverage
)
keyword.
-
Set when
[
editing a project
](
../../api/projects.md#edit-project
)
or
[
creating a project
](
../../api/projects.md#create-project
)
using the GitLab API with the
`build_coverage_regex`
attribute:
```shell
curl --request PUT --header "PRIVATE-TOKEN: <your-token>" \
--url 'https://gitlab.com/api/v4/projects/<your-project-ID>' \
--data "build_coverage_regex=<your-regular-expression>"
```
You can use
<https://rubular.com>
to test your regular expression. The regular expression returns the
**last**
match found in the output.
...
...
doc/ci/yaml/index.md
View file @
8c665d9b
...
...
@@ -1348,6 +1348,8 @@ In this example:
**Additional details**
:
-
Coverage regular expressions set in
`gitlab-ci.yml`
take precedence over coverage regular expression set in the
[
GitLab UI
](
../pipelines/settings.md#add-test-coverage-results-to-a-merge-request
)
.
-
If there is more than one matched line in the job output, the last line is used
(the first result of reverse search).
-
If there are multiple matches in a single line, the last match is searched
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment