-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
58 lines (58 loc) · 1.5 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
54
55
56
57
58
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.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.analysis.mode=preview -Dsonar.issuesReport.console.enable=true -Dsonar.gitlab.commit_sha=$CI_BUILD_REF -Dsonar.gitlab.ref=$CI_BUILD_REF_NAME
tags:
- docker
test_sonar_job:
stage: test
only:
- master
script:
- mvn --batch-mode verify org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN
tags:
- docker
deploy_job:
stage: deploy
only:
- master
script:
- mvn --batch-mode deploy -Dmaven.test.skip=true -Djacoco.skip=true
tags:
- docker
deploy_tags_job:
stage: deploy
only:
- tags
script:
- mvn --batch-mode org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=$CI_BUILD_REF_NAME -DgenerateBackupPoms=false
- mvn --batch-mode deploy -Dmaven.test.skip=true -Djacoco.skip=true -Prelease
tags:
- docker