Print response body in job log on artifact uploads

Description

Today, gitlab-runner doesn't print any of the response body passed back when it attempts an artifact upload. In scenarios where the artifact upload fails (for example, due to a duplicate key), the error response given isn't clear, and doesn't include any of the information the GitLab API returns in the response body (example: gitlab!75861 (merged)).

example log output today:

Uploading artifacts...
var.env: found 1 matching files and directories    
WARNING: Uploading artifacts as "dotenv" to coordinator... failed  id=1869029519 responseStatus=400 Bad Request status=400 token=XSThWtzz
WARNING: Retrying...

was sourced from https://gitlab.com/jrreid/duplicate-dotenv-test/-/jobs/1869029519

Proposal

gitlab-runner should echo the response body from the artifacts api.

Links to related issues and merge requests / references

Edited by Jamie Reid