-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
37 lines (35 loc) · 1.07 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
include:
- project: 'widas/codequality'
ref: code-coverage-failure-allow
file: 'ci_templates/android.gitlab-ci.yml'
- template: Dependency-Scanning.gitlab-ci.yml
stages:
- test
- badges
- deploy
code_quality_json:
stage: test
allow_failure: true
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
CODE_QUALITY_IMAGE: "codeclimate/codeclimate"
script:
- docker pull "$CODE_QUALITY_IMAGE"
# Clone the .codeclimate.yml from the code quality base repo
- git clone ${QUALITY_BASE_REPO}
- cp codequality/conf/codeclimate/rules/java/.codeclimate.yml .
- rm -rf codequality
# Run the codeclimate image from gitlab
- docker run
--env SOURCE_CODE="$PWD"
--env CODECLIMATE_CODE="$PWD/app"
--volume /tmp/cc:/tmp/cc
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
codeclimate/codeclimate:latest analyze -f json > gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths: [gl-code-quality-report.json]
dependencies: []