Skip to content

Uploading junit report return error 500 instead of meaningful error

Summary

When an artifacts:report:junit directive is used in a pipeline but junit directive is mentioning a directory or files other than .xml file, the pipeline will throw 500 errors.

Steps to reproduce

Create a pipeline that output

Example Project

Failed pipeline: https://gitlab.com/rotanak/maven-web-application/-/jobs/521707528 and example .gitlab-ci.yml: https://gitlab.com/rotanak/maven-web-application/-/blob/6836adc7cffc3a3e73803e93ec2a46d403dc162f/.gitlab-ci.yml#L78

Passed pipeline: https://gitlab.com/rotanak/maven-web-application/-/jobs/521756719 and example .gitlab-ci.yml: https://gitlab.com/rotanak/maven-web-application/-/blob/f7f02ba46fcd52bf641f125b9130f46df9cf9857/.gitlab-ci.yml#L79

What is the current bug behavior?

Pipeline fail with 500 error instead of clarifying why it failed

What is the expected correct behavior?

Providing relevant error instead of 500 error.

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)

Output of checks

This bug happens on GitLab.com; GitLab Enterprise Edition 13.0.0-pre b99bef61