Commit e44becee authored by Hannes Rosenögger's avatar Hannes Rosenögger

The Junit reports should always be uploaded

Without specifying `when:always` the junit reports
will only be uploaded if the job succeeds.
While this is documented behaviour, this causes confusion for
some users. As a simple solution we can just change the provided
examples to already include the relevant line.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/215901
parent a126ec82
......@@ -97,6 +97,7 @@ ruby:
- bundle install
- bundle exec rspec --format progress --format RspecJunitFormatter --out rspec.xml
artifacts:
when: always
paths:
- rspec.xml
reports:
......@@ -116,6 +117,7 @@ golang:
- go get -u github.com/jstemmer/go-junit-report
- go test -v 2>&1 | go-junit-report -set-exit-code > report.xml
artifacts:
when: always
reports:
junit: report.xml
```
......@@ -137,6 +139,7 @@ java:
script:
- gradle test
artifacts:
when: always
reports:
junit: build/test-results/test/**/TEST-*.xml
```
......@@ -156,6 +159,7 @@ java:
script:
- mvn verify
artifacts:
when: always
reports:
junit:
- target/surefire-reports/TEST-*.xml
......@@ -173,6 +177,7 @@ pytest:
script:
- pytest --junitxml=report.xml
artifacts:
when: always
reports:
junit: report.xml
```
......@@ -194,6 +199,7 @@ cpp:
script:
- gtest.exe --gtest_output="xml:report.xml"
artifacts:
when: always
reports:
junit: report.xml
```
......@@ -208,6 +214,7 @@ cunit:
script:
- ./my-cunit-test
artifacts:
when: always
reports:
junit: ./my-cunit-test.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