Commit 016c4893 authored by Evan Read's avatar Evan Read

Merge branch 'patch-51' into 'master'

Add example for the artifacts:paths section

See merge request gitlab-org/gitlab-ce!27523
parents d80b3439 aff780c4
Pipeline #59335119 passed with stages
in 50 minutes and 46 seconds
...@@ -71,11 +71,11 @@ merge request widget. ...@@ -71,11 +71,11 @@ merge request widget.
NOTE: **Note:** NOTE: **Note:**
If you also want the ability to browse JUnit output files, include the If you also want the ability to browse JUnit output files, include the
[`artifacts:paths`](yaml/README.md#artifactspaths) keyword. [`artifacts:paths`](yaml/README.md#artifactspaths) keyword. An example of this is shown in the Ruby example below.
### Ruby example ### Ruby example
Use the following job in `.gitlab-ci.yml`: Use the following job in `.gitlab-ci.yml`. This includes the `artifacts:paths` keyword to provide a link to the JUnit output file.
```yaml ```yaml
## Use https://github.com/sj26/rspec_junit_formatter to generate a JUnit report with rspec ## Use https://github.com/sj26/rspec_junit_formatter to generate a JUnit report with rspec
...@@ -85,6 +85,8 @@ ruby: ...@@ -85,6 +85,8 @@ ruby:
- bundle install - bundle install
- rspec spec/lib/ --format RspecJunitFormatter --out rspec.xml - rspec spec/lib/ --format RspecJunitFormatter --out rspec.xml
artifacts: artifacts:
paths:
- rspec.xml
reports: reports:
junit: rspec.xml junit: rspec.xml
``` ```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment