diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-06-14 14:05:49 +0200 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2019-06-14 14:05:49 +0200 |
commit | f0773d9ec8628e301c5a673ff7b7c2193569395d (patch) | |
tree | 9fb8690ecd4be2f5f9383d4ee5bcd57519a7b71e | |
parent | c7c960cca673d211f2c4bd60409c2ef7ca456e05 (diff) | |
download | gitlab-ce-f0773d9ec8628e301c5a673ff7b7c2193569395d.tar.gz |
Refactor Code Quality templates into single filemc/bug/old-codequality-template-autodevops
-rw-r--r-- | lib/gitlab/ci/templates/Code-Quality.gitlab-ci.yml | 19 | ||||
-rw-r--r-- | lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml | 17 |
2 files changed, 12 insertions, 24 deletions
diff --git a/lib/gitlab/ci/templates/Code-Quality.gitlab-ci.yml b/lib/gitlab/ci/templates/Code-Quality.gitlab-ci.yml index 10b25af904f..b4ccf96b859 100644 --- a/lib/gitlab/ci/templates/Code-Quality.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Code-Quality.gitlab-ci.yml @@ -1,17 +1,2 @@ -code_quality: - image: docker:stable - allow_failure: true - services: - - docker:stable-dind - variables: - DOCKER_DRIVER: overlay2 - script: - - 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:11-8-stable" /code - artifacts: - reports: - codequality: gl-code-quality-report.json - expire_in: 1 week +include: + template: Jobs/Code-Quality.gitlab-ci.yml diff --git a/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml index b09a24d8e22..46c4c755729 100644 --- a/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml @@ -4,21 +4,24 @@ code_quality: allow_failure: true services: - docker:stable-dind + variables: + DOCKER_DRIVER: overlay2 script: - - export CQ_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - | 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 SOURCE_CODE="$PWD" \ - --volume "$PWD":/code \ - --volume /var/run/docker.sock:/var/run/docker.sock \ - "registry.gitlab.com/gitlab-org/security-products/codequality:$CQ_VERSION" /code + - 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:11-8-stable" /code artifacts: - paths: [gl-code-quality-report.json] + reports: + codequality: gl-code-quality-report.json + expire_in: 1 week only: - branches - tags |