Code quality template is not working in kubernetes
Summary
Cannot use the gitlab-ci.yml template for code quality on runners deployed on kubernetes.
Because of [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]
DOCKER_HOST is not getting assigned, so build fails with:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock
Steps to reproduce
- Setup a gitlab runner on [kubernetes]
- add Code Quality job to the gitlab-ci.yml
- Run the pipeline
What is the current bug behavior?
Actual results: See above
What is the expected correct behavior?
Expected results: code quality job runs successfully
Possible fixes
Removing KUBERNETES_PORT from the construction solves the issue.
@rickywiens has made a hypothesis that #9784 may fix this issue. That needs to be dealt with for other reasons so afterwards we will re-evaluate this issue to see if it is resolved and if not schedule further investigation.
Edited by James Liu