Codeclimate not working with existing .codeclimate.yml file and invalid documentation
I tried to setup the codeclimate tool and encountered some (in my opinion) nasty issues.
If you follow the documentation (link link) the following will happen.
In my fork I update the .gitlab-ci.yml file from the documentation and commit it.
- The pipeline starts running and creates a mount from the job. "$PWD"=/code
- When the init is used based on the /code directory which is an empty directory on the gitlabrunner host in
/build/**
, A .codeclimate.yml will be generated (in my case this failed and didn't add engines) The codeclimate file will be placed in the container and on the host.
The next time we run the same pipeline, the directory /builds/****
is mounted from the gitlabrunner host (not the repository). When the user adds a .codeclimate.yml
to the repository the file will always be ignored and it's a bit unclear where codeclimate gets the configuration from.
I think it's sometimes preferred to have the .codeclimate.yml
file in your repository
Currently it seems impossible/over complicated (nothing is impossible) to add the .codeclimate.yml
from the repository.
The main problem here is that $PWD
and/or $CI_PROJECT_DIR
is not suitable to mount directories from the job when using docker in docker.