forked from llamasGST/jdvp-odoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
53 lines (50 loc) · 1.51 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
stages:
- sonarqube
- lint_check
lint_check:
stage: lint_check
image: guadaltech/fast-python:latest
variables:
DEBIAN_FRONTEND: "noninteractive"
VERSION: "12.0"
TESTS: "0"
MAKEPOT: "0"
LINT_CHECK: "1"
script:
- |
echo $CI_PROJECT_DIR \
&& cd ${HOME} \
&& git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools \
&& export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} \
&& export TRAVIS_BUILD_DIR="${CI_PROJECT_DIR}" \
&& travis_install_nightly \
&& travis_run_tests \
&& travis_after_tests_success
only:
- master
- development
sonarqube:
stage: sonarqube
image: guadaltech/gitlab-sonarqube:latest
variables:
SONAR_URL: "http://sonarqube.freyi.es"
SONAR_TOKEN: "01fa1765ab876714d3482827becd02eae0970986"
SONAR_PROJECT_KEY: "vertical-AERO"
SONAR_GITLAB_COMMENT: "true"
SONAR_PUBLISH: "true"
script:
- |
sonar-scanner \
-Dsonar.ws.timeout=9000 \
-Dsonar.projectKey="$SONAR_PROJECT_KEY" \
-Dsonar.projectName="$CI_PROJECT_NAME-$CI_BUILD_REF_NAME" \
-Dsonar.host.url="$SONAR_URL" \
-Dsonar.login="$SONAR_TOKEN" \
-Dsonar.sources=. \
-Dsonar.exclusions=**/*.xml,**/*.js,**/*.css \
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.gitlab.project_id="$CI_PROJECT_ID" \
-Dsonar.gitlab.commit_sha="$CI_COMMIT_SHA" \
-Dsonar.gitlab.ref_name="$CI_COMMIT_REF_NAME"
only:
- development