Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab CI Codequality / Codeclimate integration does not work #993

Open
2 of 3 tasks
shurkanTwo opened this issue Dec 20, 2023 · 1 comment
Open
2 of 3 tasks

GitLab CI Codequality / Codeclimate integration does not work #993

shurkanTwo opened this issue Dec 20, 2023 · 1 comment

Comments

@shurkanTwo
Copy link

  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

When using the provided example in https://github.com/hadolint/hadolint/blob/master/docs/INTEGRATION.md#gitlab-ci to publish a gitlab compatible codeclimate report I get the following error message:

ERROR: Uploading artifacts as "codequality" to coordinator... error  error=couldn't execute POST against https://..../api/v4/jobs/209298/artifacts?artifact_format=raw&artifact_type=codequality&expire_in=1+day: Post "https://..../api/v4/jobs/209298/artifacts?artifact_format=raw&artifact_type=codequality&expire_in=1+day": only one file can be sent as raw id=209298 token=....
WARNING: Retrying...                                context=artifacts-uploader error=invalid argument
ERROR: Uploading artifacts as "codequality" to coordinator... error  error=couldn't execute POST against https://..../api/v4/jobs/209298/artifacts?artifact_format=raw&artifact_type=codequality&expire_in=1+day: Post "https://..../api/v4/jobs/209298/artifacts?artifact_format=raw&artifact_type=codequality&expire_in=1+day": only one file can be sent as raw id=209298 token==....
WARNING: Retrying...                                context=artifacts-uploader error=invalid argument
ERROR: Uploading artifacts as "codequality" to coordinator... error  error=couldn't execute POST against https://..../api/v4/jobs/209298/artifacts?artifact_format=raw&artifact_type=codequality&expire_in=1+day: Post "https://..../api/v4/jobs/209298/artifacts?artifact_format=raw&artifact_type=codequality&expire_in=1+day": only one file can be sent as raw id=209298 token==....

Also the link in the documentation (https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html#implementing-a-custom-tool) doesn't work.

Actual behavior

It is possible to combine the reports into one json file with jq. But I have not gotten GitLab to read that combined file yet.

Steps to reproduce the behavior

@kpochwala
Copy link

You can run hadolint following way:

hadolint --config hadolint-config.yml images/*.Dockerfile

Note asterisk - it will run on all Dockerfiles in images directory and combine output to single json, which can be easily uploaded to Gitlab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants