Added codequality jobs.

This commit is contained in:
Quentin DECAUNES 2019-07-05 11:35:30 +02:00
parent dcd735668f
commit eecb8b84c4

View File

@ -8,6 +8,34 @@ stages:
- package - package
- installer - 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: dependency_scanning:
stage: test stage: test
only: only: