forked from gabrie-allaigre/sonar-gitlab-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (52 loc) · 1.59 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
image: maven:3.3.3-jdk-8
stages:
- build
- test
- deploy
build_job:
stage: build
only:
- master
script:
- mvn --batch-mode compile -Dmaven.test.skip=true -Djacoco.skip=true
tags:
- docker
build_merge_job:
stage: build
except:
- master
- tags
script:
- git merge origin master --no-commit --no-ff
- mvn --batch-mode compile -Dmaven.test.skip=true -Djacoco.skip=true
tags:
- docker
test_sonar_preview_job:
stage: test
except:
- master
- tags
script:
- git merge origin master --no-commit --no-ff
- mvn --batch-mode verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.analysis.mode=preview -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.gitlab.project_id=$CI_PROJECT_ID
tags:
- docker
test_sonar_feature_job:
stage: test
except:
- master
- tags
script:
- git merge origin master --no-commit --no-ff
- mvn --batch-mode verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar -Dsonar.host.url=$SONAR_OFF_URL -Dsonar.login=$SONAR_OFF_LOGIN -Dsonar.branch.name=$CI_COMMIT_REF_NAME
tags:
- docker
test_sonar_job:
stage: test
only:
- master
script:
- mvn --batch-mode verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN
- mvn --batch-mode verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar -Dsonar.host.url=$SONAR_OFF_URL -Dsonar.login=$SONAR_OFF_LOGIN
tags:
- docker