Code quality job doesn't generate artifact

Hello everyone,

Unfortunately the already existing posts didn’t solved my problem even if they are very similar to my question:
( I am the group owner with a bronze plan )
I am testing code quality report on merge request and here is step by step what I am doing:
1 - create a new private project
2- register a specific runner (dind one, like this: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker-executor)
3 - adding a gitlab-ci.yml file in the master branch with this code:
code_quality:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo “$CI_SERVER_VERSION” | sed ‘s/^([0-9]).([0-9]).*/\1-\2-stable/’)
- docker run
–env SOURCE_CODE="$PWD"
–env CONTAINER_TIMEOUT_SECONDS=9000
–volume “$PWD”:/code
–volume /var/run/docker.sock:/var/run/docker.sock
registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION” /code
artifacts:
reports:
codequality: gl-code-quality-report.json
only:
- master
- merge_requests

4 - after that, a job run and end with success with that:
Uploading artifacts... gl-code-quality-report.json: found 1 matching files Uploading artifacts to coordinator... ok id=232814660 responseStatus=201 Created token=2snjT47o Job succeeded
I have no report to upload but I think it’s normal at this point

5 - I create a new branch and add some php, js example files to this branch
6 - I create a merge request mybranch > master

7 - after that, a job run and end with success with that:
Uploading artifacts... gl-code-quality-report.json: found 1 matching files Uploading artifacts to coordinator... ok id=232844201 responseStatus=201 Created token=r54Y5_Fw Job succeeded
I still have no report to download in the pipeline view and I see no report in the merge request view: What did I miss ?

thank you in advance,
Rachel

Hey,

sorry for that useles post, but this morning I see the report in the merge request view ! I don’t know if there is a time to wait or if I was to tired yesterday to see it…

Cheers,
Rachel

Hey @rfoucard. Welcome to the GitLab Forum and thank you for posting your detailed comment.

It’s good to have your feedback here, since other users may find it useful :slight_smile:

Hi,

I have my artifacts generated everytime but I can never see it unless I open the log from the job result.

When I use the API to get the artifacts it returns 404 even though it’s generated.

Any ideas?