summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-06-30 09:19:51 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2017-06-30 09:19:51 +0000
commit4a9ffb2376163ce6c81dcf09ad3601098cc7d23d (patch)
tree75b6a83cbdd2cd6d94b9c8674f8ce489690e9c2b
parent42ac5c352b5517b2da4f75afb814aff9fddadeee (diff)
parentc051d47de83ed0446a05d3972a806f953a6d4bb9 (diff)
downloadgitlab-ce-4a9ffb2376163ce6c81dcf09ad3601098cc7d23d.tar.gz
Merge branch 'dz-improve-codeclimate-json-cleanup' into 'master'
Cleanup codeclimate.json file generated by CI See merge request !12565
-rw-r--r--.gitlab-ci.yml5
1 files changed, 3 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e52b656599c..5723b836c76 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -474,9 +474,10 @@ codeclimate:
services:
- docker:dind
script:
+ - docker pull stedolan/jq
- docker pull codeclimate/codeclimate
- - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f json > codeclimate.json
- - sed -i.bak 's/\({"body":"\)[^"]*\("}\)/\1\2/g' codeclimate.json
+ - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f json > raw_codeclimate.json
+ - cat raw_codeclimate.json | docker run -i stedolan/jq -c 'map({check_name,fingerprint,location})' > codeclimate.json
artifacts:
paths: [codeclimate.json]