From eecb8b84c45d861f59bdfbe377da428591d9e05b Mon Sep 17 00:00:00 2001 From: Quentin DECAUNES Date: Fri, 5 Jul 2019 11:35:30 +0200 Subject: [PATCH] Added codequality jobs. --- .gitlab-ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63bda2b..7162a87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,34 @@ stages: - package - installer +code_quality: + stage: test + image: docker:stable + allow_failure: true + services: + - docker:stable-dind + variables: + DOCKER_DRIVER: overlay2 + script: + - | + if ! docker info &>/dev/null; then + if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then + export DOCKER_HOST='tcp://localhost:2375' + fi + fi + - docker run + --env CODECLIMATE_CODE="$PWD" + --volume "$PWD":/code + --volume /var/run/docker.sock:/var/run/docker.sock + --volume /tmp/cc:/tmp/cc + --entrypoint "/bin/sh" codeclimate/codeclimate -c "/usr/src/app/bin/codeclimate engines:install && /usr/src/app/bin/codeclimate analyze" + only: + - branches@le.storm1er/ryzen-controller + - tags@le.storm1er/ryzen-controller + except: + variables: + - $CODE_QUALITY_DISABLED + dependency_scanning: stage: test only: