diff options
author | Maastiff <brabant.benjamin@gmail.com> | 2018-08-31 19:01:11 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-09-03 12:53:06 +0200 |
commit | 5fb044b05528338360c8870589be3ca396c71f3f (patch) | |
tree | 3c53dd1613c2377cf8a48b041b2402858d72b072 | |
parent | 990278bed9daf6ba78ab2ede2cebb118954ea952 (diff) | |
download | gitlab-ce-5fb044b05528338360c8870589be3ca396c71f3f.tar.gz |
Update junit_test_reports.md by providing new example for java, using gradle build tool
-rw-r--r-- | doc/ci/junit_test_reports.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/ci/junit_test_reports.md b/doc/ci/junit_test_reports.md index 5ae8ecaafa6..9b469938f80 100644 --- a/doc/ci/junit_test_reports.md +++ b/doc/ci/junit_test_reports.md @@ -100,3 +100,23 @@ golang: reports: junit: report.xml ``` + +### Java examples +#### Gradle + +Use the following job in `.gitlab-ci.yml`: + +```yaml +java: + stage: test + script: + - gradle test + artifacts: + reports: + junit: build/test-results/test/TEST-*.xml +``` + +If you define multiple tasks of kind test, it will generate multiple directories +under `build/test-results/` directory. +To address all subdirectory at once, you can leverage regex matching by defining following +path: `build/test-results/test/TEST-*.xml` |