From d2c82cf68f5abac3d86474e62753bc9cdb732637 Mon Sep 17 00:00:00 2001 From: Roshan Syed Date: Fri, 4 Oct 2019 10:52:12 -0300 Subject: [PATCH] Support/gitlab develop (#168) * Added code_quality to CI * Update .gitlab-ci.yml --- .gitlab-ci.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8430f63..8355d795 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,4 +29,26 @@ test: - ./tests/chain_test - ./tests/cli_test tags: - - builder \ No newline at end of file + - builder + +code_quality: + stage: test + image: docker:stable + variables: + DOCKER_DRIVER: overlay2 + allow_failure: true + services: + - docker:stable-dind + script: + - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') + - docker run + --env SOURCE_CODE="$PWD" + --volume "$PWD":/code + --volume /var/run/docker.sock:/var/run/docker.sock + "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code + artifacts: + paths: [gl-code-quality-report.json] + expire_in: 1 week + except: + variables: + - $CODE_QUALITY_DISABLED