Missing codequality artifact

Hi,
I have setup a code quality stage in my Docker-CI (using Gitlab-ee release 12.4.3).
I tried all available configurations to execute codeclimate, but it always finishes with an error while trying to get the artifact:

Uploading artifacts…
WARNING: gl-code-quality-report.json: no matching files
ERROR: No files to upload
Job succeeded

This is my stage configuration:

quality:
    stage: quality
    allow_failure: true
    image: docker:stable
    services:
        - docker:stable-dind
    variables:
        DOCKER_DRIVER: overlay2
        DOCKER_TLS_CERTDIR: ""
    script:
        - |
            if ! docker info &>/dev/null; then
              if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
                export DOCKER_HOST='tcp://localhost:2375'
              fi
            fi
        - docker run
            --env SOURCE_CODE="$PWD"
            --volume "$PWD":/code
            --volume /var/run/docker.sock:/var/run/docker.sock
            "registry.gitlab.com/gitlab-org/security-products/codequality:12-0-stable" /code
    artifacts:
        reports:
            codequality: gl-code-quality-report.json
        expire_in: 1 week
    dependencies: []
    only:
        refs:
            - branches
            - tags
    except:
        variables:
            - $CODE_QUALITY_DISABLED

And here is my runner configuration:

concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "xgit98-000 docker runner"
  url = "https://gitlab.xxx.yy/"
  token = "cbLbwuRsho6RpjysVfHG"
  executor = "docker"
  pre_build_script = "mkdir -p $HOME/.docker/ && echo \"{ \\\"proxies\\\": { \\\"default\\\": { \\\"httpProxy\\\": \\\"$HTTP_PROXY\\\", \\\"httpsProxy\\\": \\\"$HTTPS_PROXY\\\", \\\"noProxy\\\": \\\"$NO_PROXY\\\" } } }\" > $HOME/.docker/config.json"
  pre_clone_script = "git config --global http.sslVerify false && git config --global http.proxy $HTTP_PROXY; git config --global https.proxy $HTTP_PROXY; git config --global --add remote.origin.proxy ''"
  environment = ["https_proxy=http://172.17.0.1:3128", "http_proxy=http://172.17.0.1:3128", "HTTPS_PROXY=http://172.17.0.1:3128", "HTTP_PROXY=http://172.17.0.1:3128"]
  [runners.custom_build_dir]
  [runners.docker]
    tls_verify = false
    image = "docker:latest"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    cache_dir = "/cache"
    volumes = ["/cache", "/var/run/docker.sock:/var/run/docker.sock", "/tmp/builds:/builds"]
    shm_size = 0
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]

Any idea about how to correctly get my report?

Best regards,
Thierry

Hi @tflorac thanks for the question. You’ll need a path set to the resulting .json file (see the code quality docs for info on that) . Also note that the code_quality job must be the -test stage.

Hope this helps!

-JH

Hi,
Thanks for your answer!
I updated my configuration file by changing the stage name to “test” and by using a path set for the artifact. But this didn’t changed anything!
I noticed also that my configuration seems to be correct according to the documentation you’re pointing to for last Gitlab releases…
Best regards,
Thierry

Theirry - sorry my answer wasn’t any help. are you grabbing the latest docker image? The file you added above looks to have 12.0 hard coded in vs. using $SP_VERSION as the docs show. I’m not sure if that change would fix it but could be worth a try.

Good luck!

-JH

Yes, I have tested with $SP_VERSION also… :frowning:
Thanks anyway!