Skip to content

Code Quality not shown in Status Widget

Summary

Codeclimate report does not show up.

Steps to reproduce

  • add sample code to .gitlab-ci
  • run the pipeline

Relevant logs and/or screenshots

Bildschirmfoto_vom_2017-06-23_10_30_31

Bildschirmfoto_vom_2017-06-23_10_30_53

Build output (shortened)

$ 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 > codeclimate.json
Creating cache project-composer-cache...
Created cache
Uploading artifacts...
codeclimate.json: found 1 matching files           
Uploading artifacts to coordinator... ok            id=30493 responseStatus=201 Created token=vw1PS6sW
Job succeeded

Job definition:

codeclimate:
  image: docker:latest
#  variables: 
#    DOCKER_DRIVER: overlay # leads to error - deactivated
  services:
    - docker:dind
  script:
    - 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 init
    - 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 > codeclimate.json
  artifacts:
    paths: [codeclimate.json]
  stage: test
  tags:
    - autoscale

codeclimate.json: codeclimate.json

Results of GitLab environment info

System information
System:		Ubuntu 14.04
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	2.3.3p222
Gem Version:	2.6.6
Bundler Version:1.13.7
Rake Version:	10.5.0
Redis Version:	3.2.5
Git Version:	2.13.0
Sidekiq Version:5.0.0
Go Version:	unknown

GitLab information
Version:	9.3.0-ee
Revision:	7523f02
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
DB Version:	9.6.3
URL:		https://gitlab.cwd.at
HTTP Clone URL:	https://gitlab.cwd.at/some-group/some-project.git
SSH Clone URL:	git@gitlab.cwd.at:some-group/some-project.git
Elasticsearch:	yes
Geo:		no
Using LDAP:	no
Using Omniauth:	no

GitLab Shell
Version:	5.0.5
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
Hooks:		/opt/gitlab/embedded/service/gitlab-shell/hooks
Git:		/opt/gitlab/embedded/bin/git

Results of GitLab application Check

Checking GitLab Shell ...

GitLab Shell version >= 5.0.5 ? ... OK (5.0.5)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:root, or git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ... 
[.. shortend all ok ..]
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Reply by email ...

IMAP server credentials are correct? ... yes
Init.d configured correctly? ... skipped (omnibus-gitlab has no init script)
MailRoom running? ... can't check because of previous errors

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ... 
[..shortend - all yes... ]
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.3 ? ... yes (2.3.3)
Git version >= 2.7.3 ? ... yes (2.13.0)
Active users: ... 30
Elasticsearch version 5.1 - 5.3? ... rake aborted!
NameError: undefined local variable or method `current_version' for #<SystemCheck::App::ElasticsearchCheck:0x007f72e2571f50>
Did you mean?  checkout_version
/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/app/elasticsearch_check.rb:21:in `check?'
/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/simple_executor.rb:61:in `run_check'
/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/simple_executor.rb:35:in `block in execute'
/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/simple_executor.rb:34:in `execute'
/opt/gitlab/embedded/service/gitlab-rails/lib/system_check.rb:19:in `run'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:42:in `block (3 levels) in <main>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
Tasks: TOP => gitlab:check => gitlab:app:check
(See full trace by running task with --trace)
Edited by Ludwig Ruderstaller