Code climate creates only empty result
Summary
The code climate provided by GitLab does only creates an empty result.
Steps to reproduce
code_quality:
stage: package
except:
- schedules
image: docker:stable
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- "echo \"SP_VERSION=${SP_VERSION}\""
- docker run
--env SOURCE_CODE="/code"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
# - docker pull codeclimate/codeclimate
# - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate engines:install
# - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f json > gl-code-quality-report.json
artifacts:
expire_in: 3 d
paths: [gl-code-quality-report.json]
What is the current bug behavior?
empty gl-code-quality-report.json
What is the expected correct behavior?
similar result to a manual code climate invocation like this:
code_quality:
stage: package
except:
- schedules
image: docker:stable
allow_failure: true
services:
- docker:stable-dind
script:
# - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
# - "echo \"SP_VERSION=${SP_VERSION}\""
# - docker run
# --env SOURCE_CODE="/code"
# --volume "$PWD":/code
# --volume /var/run/docker.sock:/var/run/docker.sock
# "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
- docker pull codeclimate/codeclimate
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate engines:install
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f json > gl-code-quality-report.json
artifacts:
expire_in: 3 d
paths: [gl-code-quality-report.json]