diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-03-07 15:02:19 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2019-03-15 16:37:26 +0100 |
commit | f2eac81bc8f63cdc7630e66fbd26117d8960c379 (patch) | |
tree | 819169178562248694a5983ca74979390f73ebd1 /lib/gitlab/ci/templates | |
parent | 3527e3e43c617f413fadf42ab270918b470912bb (diff) | |
download | gitlab-ce-f2eac81bc8f63cdc7630e66fbd26117d8960c379.tar.gz |
Add Code-Quality CI template
Diffstat (limited to 'lib/gitlab/ci/templates')
-rw-r--r-- | lib/gitlab/ci/templates/Code-Quality.gitlab-ci.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/gitlab/ci/templates/Code-Quality.gitlab-ci.yml b/lib/gitlab/ci/templates/Code-Quality.gitlab-ci.yml new file mode 100644 index 00000000000..2e8d1184ef3 --- /dev/null +++ b/lib/gitlab/ci/templates/Code-Quality.gitlab-ci.yml @@ -0,0 +1,26 @@ +code_quality: + image: docker:stable + allow_failure: true + # gitlab-org runners set `privileged: false` but we need to have it set to true + # since we're using Docker in Docker + tags: [] + before_script: [] + services: + - docker:stable-dind + variables: + SETUP_DB: "false" + DOCKER_DRIVER: overlay2 + cache: {} + dependencies: [] + script: + # Extract "MAJOR.MINOR" from CI_SERVER_VERSION and generate "MAJOR-MINOR-stable" for Security Products + - 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: + reports: + codequality: gl-code-quality-report.json + expire_in: 1 week |