Skip to content

Upload of multiple codequality reports fails with 'only one file can be sent as raw'

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Uploading multiple codequality reports in one job fails with the error only one file can be sent as raw

Steps to reproduce

  • Configure a gitlab-ci job that uploads multiple codequality reports
codequality:
    stage: test
    script:
        - 'true'
    artifacts:
        reports:
            codequality:
                - 'codequality.*.json'

Example Project

https://gitlab.com/alexander.gottwald/multiple-codequality-reports

What is the current bug behavior?

The upload fails with

Uploading artifacts...
codequality.*.json: found 2 matching files and directories 
ERROR: Uploading artifacts as "codequality" to coordinator... error  error=couldn't execute POST against https://gitlab.com/api/v4/jobs/2033509533/artifacts?artifact_format=raw&artifact_type=codequality: Post "https://gitlab.com/api/v4/jobs/2033509533/artifacts?artifact_format=raw&artifact_type=codequality": only one file can be sent as raw id=2033509533 token=Phy4y3JH

What is the expected correct behavior?

Uploading multiple codequality artifacts works like it does for regular artifacts

Uploading artifacts...
**/target/spotbugs-codeclimate.xml: found 2 matching files and directories 
**/target/spotbugs-codeclimate.json: found 2 matching files and directories 
Uploading artifacts as "archive" to coordinator... 201 Created  id=54131 responseStatus=201 Created token=abc

Relevant logs and/or screenshots

Uploading artifacts...
codequality.*.json: found 2 matching files and directories 
ERROR: Uploading artifacts as "codequality" to coordinator... error  error=couldn't execute POST against https://gitlab.com/api/v4/jobs/2033509533/artifacts?artifact_format=raw&artifact_type=codequality: Post "https://gitlab.com/api/v4/jobs/2033509533/artifacts?artifact_format=raw&artifact_type=codequality": only one file can be sent as raw id=2033509533 token=Phy4y3JH

Output of checks

This bug happens on GitLab.com

Possible fixes

Edited by 🤖 GitLab Bot 🤖