diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-05-19 16:20:48 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-05-19 16:20:48 +0100 |
commit | 4d9ad9f93c5818a181e4feba47f97212327ac087 (patch) | |
tree | 9b0d7fb8f053b89c41417f0c21aca42cd478dc41 /doc/ci/examples/code_climate.md | |
parent | 4d8f98693726b54d0e1c384a641e9aa6627fdf41 (diff) | |
parent | 60d5063d15fd43f89d5b4ebf379d7a64768a0953 (diff) | |
download | gitlab-ce-24339-job-page.tar.gz |
Merge branch 'master' into 24339-job-page24339-job-page
* master: (190 commits)
Replaced duplicate z-index with index of 400
Enable RSpec profiling only if RSPEC_PROFILING_POSTGRES_URL is not empty
Add descriptions for the RSpec/EmptyExampleGroup and RSpec/ExpectOutput cops
Add note about artifacts previewing in docs
MRWidget: Make error message bold and red.
Fixes the 500 for custom apearance header logo and logo
MRWidget: Change refresh button place in failed state.
Remove readme project_view option
Update prometheus documentation
Fix JavaScript translations that are using a namespace
MRWidget: Add refresh button into MR widget failed state.
Add s selectors for supported avatars.
Render plain README using Markup viewer so it is displayed below tree
Add docs on how to turn off SSL verification on GH oauth
Fix clicking disabled clipboard button toolip
Stop MR conflict code from blowing up when branches are missing
Update edit.html.haml Closes #32555
Fixes per feedback on user avatar components.
Consolidate user avatar Vue logic
Fixes for the rename reserved paths helpers
...
Diffstat (limited to 'doc/ci/examples/code_climate.md')
-rw-r--r-- | doc/ci/examples/code_climate.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/ci/examples/code_climate.md b/doc/ci/examples/code_climate.md new file mode 100644 index 00000000000..bd53f80ce14 --- /dev/null +++ b/doc/ci/examples/code_climate.md @@ -0,0 +1,28 @@ +# Analyze project code quality with Code Climate CLI + +This example shows how to run [Code Climate CLI][cli] on your code by using\ +GitLab CI and Docker. + +First, you need GitLab Runner with [docker-in-docker executor](../docker/using_docker_build.md#use-docker-in-docker-executor). + +Once you setup the Runner add new job to `.gitlab-ci.yml`: + +```yaml +codeclimate: + image: docker:latest + variables: + DOCKER_DRIVER: overlay + services: + - docker:dind + script: + - 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 init + - 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 + artifacts: + paths: [codeclimate.json] +``` + +This will create a `codeclimate` job in your CI pipeline and will allow you to +download and analyze the report artifact in JSON format. + +[cli]: https://github.com/codeclimate/codeclimate |