Code Quality fails

I’m trying to follow the documentation for code quality here

I have tried adding this on our .gitlab-ci.yml:

include:
       template: Code-Quality.gitlab-ci.yml

but I always get this error upon running this on the pipeline:

Running with gitlab-runner 12.8.0 (1b659122)
   on runner_example_registry ChHvwzKg
Using Docker executor with image docker:stable ...
00:35
 Starting service docker:stable-dind ...
 Pulling docker image docker:stable-dind ...
 Using docker image sha256:71edd6fcc7ef9b0427a2fc666a2379460622769e6ed1440583c30638c9403d50 for docker:stable-dind ...
 Waiting for services to be up and running...
 *** WARNING: Service runner-ChHvwzKg-project-29-concurrent-0-docker-0 probably didn't start properly.
 Health check error:
 service "runner-ChHvwzKg-project-29-concurrent-0-docker-0-wait-for-service" timeout
 Health check container logs:
 Service container logs:
 2020-11-03T13:41:43.914696246Z mount: permission denied (are you root?)
 2020-11-03T13:41:43.914717701Z Could not mount /sys/kernel/security.
 2020-11-03T13:41:43.914721737Z AppArmor detection and --privileged mode might break.
 2020-11-03T13:41:43.914724460Z mount: permission denied (are you root?)
 *********
 Pulling docker image docker:stable ...
 Using docker image sha256:6972c414f322dfa40324df3c503d4b217ccdec6d576e408ed10437f508f4181b for docker:stable ...
Running on runner-ChHvwzKg-project-29-concurrent-0 via cbef78d51887...
00:01
Fetching changes...
 Skipping Git submodules setup
$ docker info
00:01
 Client:
  Debug Mode: false
 Server:
 ERROR: error during connect: Get http://docker:2375/v1.40/info: dial tcp: lookup docker on 67.207.67.2:53: no such host
 errors pretty printing info
Uploading artifacts...
00:01
 WARNING: gl-code-quality-report.json: no matching files 
 ERROR: No files to upload                          
 ERROR: Job failed: exit code 1

We are using the Community Edition but pretty sure we should be able to use this. Please let me know how can I make this work? Thank you!

@sepira Thanks for the post!

The community edition should be able to use Code Quality to generate the Code Quality MR widget, you’re correct. It looks like you are not using a privileged runner. This documentation should help you get that resolved and working.

Hope this helps!

-James H, GitLab Product Manager, Verify:Testing