diff options
author | Olivier Gonzalez <ogonzalez@gitlab.com> | 2018-04-04 10:01:52 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-04-04 10:01:52 +0000 |
commit | 81aba67e54013d75334dfc26dfde1d2b30e204a5 (patch) | |
tree | d762026603dbd4c4e75c2ddace40ae0a5b3f04eb /.gitlab-ci.yml | |
parent | 9c728799bdb431141e763c507d6ffec0792f9104 (diff) | |
download | gitlab-ce-81aba67e54013d75334dfc26dfde1d2b30e204a5.tar.gz |
Use standard codequality job
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 66fbf3fce58..86bdb7a4643 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -618,7 +618,8 @@ karma: codequality: <<: *dedicated-no-docs-no-db-pull-cache-job - image: docker:latest + 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: [] @@ -628,14 +629,15 @@ codequality: variables: SETUP_DB: "false" DOCKER_DRIVER: overlay2 - CODECLIMATE_FORMAT: json cache: {} dependencies: [] script: - - apk update && apk add jq - - ./scripts/codequality analyze -f json > raw_codeclimate.json || true - # The following line keeps only the fields used in the MR widget, reducing the JSON artifact size - - jq -c 'map({check_name,description,fingerprint,location})' raw_codeclimate.json > codeclimate.json + # Get the custom rubocop codeclimate image (https://gitlab.com/gitlab-org/codeclimate-rubocop/wikis/home) + - docker pull dev.gitlab.org:5005/gitlab/gitlab-build-images:gitlab-codeclimate-rubocop-0-52-1 + - docker tag dev.gitlab.org:5005/gitlab/gitlab-build-images:gitlab-codeclimate-rubocop-0-52-1 codeclimate/codeclimate-rubocop:gitlab-codeclimate-rubocop-0-52-1 + # 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: paths: [codeclimate.json] expire_in: 1 week |