junit artifacts failing to upload if a test fails
Summary
I have added
artifacts:
paths:
- target/surefire-reports/TEST-*.xml
to my .gitlab_ci.yml
file. When all my tests pass successfully, the surefire results.xml files are available for download. When a test fails, the results artifacts are parsed (the failed tests are in the MR widget and the JUnit report) but the artifacts are failing to upload.
Steps to reproduce
- follow documentation instructions to parse Maven Surefire test reports and add a
paths
entry underartifacts
- or run the pipeline for the
no-results-artifact-on-fail
branch in this junit-spring-sample project
Example Project
edmondchan/junit-spring-sample!1
What is the current bug behavior?
Job artifacts not uploaded and missing. https://gitlab.com/edmondchan/junit-spring-sample/-/jobs/528289275
What is the expected correct behavior?
Job artifacts are available for download. https://gitlab.com/edmondchan/junit-spring-sample/-/jobs/528321102
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)