I have a pipeline with the code quality report (I can load and view this report):

But I see a message linked to this pipeline in the merge request
Failed to load codeclimate report
the tooltip is:
Base pipeline codequality artifact not found

When can I get the reason of it?
Job description:
code-quality:
stage: test
image: local-docker-hub-cache/docker:19.03.1
allow_failure: true
services:
- name: docker:19.03.1-dind
variables:
DOCKER_HOST: tcp://localhost:2375
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
script:
- iamge="local-docker-hub-cache/codeclimate:0.85.18"
- docker login ${CI_REGISTRY} -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
- docker pull ${iamge}
- docker run --env CODECLIMATE_CODE="$PWD" --volume ~/.m2:/home/root/.m2 --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc ${iamge} analyze -f json > codeclimate.json
artifacts:
reports:
codequality: codeclimate.json
Vladimir I also ran into this problem. As it turned out, this is not a mistake. It is described in detail here. In short, in order for this widget to work, you need to launch a pipeline with a code climate job on the target branch of the request. As I understand it, this is due to the fact that the widget displays data not about the current state of the branch, but about the state of the code in comparison with the target branch.
This can happen when a codequality report was created in the base branch for the later commit than your branch and the base branch have in common.
Try to rebase your feature branch against the branch you are creating a merge request to, and force-push it.
More information here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With