Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-22 09:08:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-22 09:08:58 +0300
commita81524038e6dcc33493fcef5804f7f83433caf59 (patch)
tree3be66d1073e0fa17b1ca27eba594017d517dd846
parent2b2f7ac9bc0039b822c65c15c9e7e92ee0b4bb84 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--doc/ci/yaml/index.md35
1 files changed, 21 insertions, 14 deletions
diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md
index ab4891f8dd6..4379f545f04 100644
--- a/doc/ci/yaml/index.md
+++ b/doc/ci/yaml/index.md
@@ -3258,15 +3258,16 @@ job:
### `coverage`
-Use `coverage` to configure how code coverage is extracted from the
-job output.
+Use `coverage` with a custom regular expression to configure how code coverage
+is extracted from the job output. The coverage is shown in the UI if at least one
+line in the job output matches the regular expression.
-Regular expressions are the only valid kind of value expected here. So, using
-surrounding `/` is mandatory to consistently and explicitly represent
-a regular expression string. You must escape special characters if you want to
-match them literally.
+To extract the code coverage value in the matching line, GitLab uses this
+regular expression: `\d+(\.\d+)?`.
-For example:
+**Possible inputs**: A regular expression. Must start and end with `/`.
+
+**Example of `coverage`**:
```yaml
job1:
@@ -3274,14 +3275,20 @@ job1:
coverage: '/Code coverage: \d+\.\d+/'
```
-The coverage is shown in the UI if at least one line in the job output matches the regular expression.
-If there is more than one matched line in the job output, the last line is used.
-For the matched line, the first occurrence of `\d+(\.\d+)?` is the code coverage.
-Leading zeros are removed.
+In this example:
+
+1. GitLab checks the job log for a line that matches the regular expression. A line
+ like `Code coverage: 67.89` would match.
+1. GitLab then checks the line to find a match to `\d+(\.\d+)?`. The sample matching
+ line above gives a code coverage of `67.89`.
+
+**Additional details**:
-Coverage output from [child pipelines](../pipelines/parent_child_pipelines.md) is not recorded
-or displayed. Check [the related issue](https://gitlab.com/gitlab-org/gitlab/-/issues/280818)
-for more details.
+- If there is more than one matched line in the job output, the last line is used.
+- Leading zeros are removed.
+- Coverage output from [child pipelines](../pipelines/parent_child_pipelines.md)
+ is not recorded or displayed. Check [the related issue](https://gitlab.com/gitlab-org/gitlab/-/issues/280818)
+ for more details.
### `dast_configuration` **(ULTIMATE)**