-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.gitlab-ci.yml
81 lines (72 loc) · 1.6 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
image: java:8-jdk
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
stages:
- build
- analyze
- publish
cache:
group: swagger_confluence
key: "$CI_BUILD_REF_NAME"
paths:
- .gradle/wrapper
- .gradle/caches
job_build:
stage: build
script:
- ./gradlew clean build shadowJar
except:
- master
tags:
- docker
job_build_master:
stage: build
script:
- ./gradlew clean build shadowJar -Prelease=true
only:
- master
tags:
- docker
job_analyze_develop:
stage: analyze
script:
- ./gradlew jacocoTestReport sonarqube -Dsonar.issuesReport.console.enable=true -Dsonar.gitlab.commit_sha=$CI_BUILD_REF -Dsonar.gitlab.ref=$CI_BUILD_REF_NAME
only:
- develop
tags:
- docker
job_analyze_pull:
stage: analyze
script:
- ./gradlew jacocoTestReport sonarqube -Dsonar.analysis.mode=preview -Dsonar.issuesReport.console.enable=true -Dsonar.gitlab.commit_sha=$CI_BUILD_REF -Dsonar.gitlab.ref=$CI_BUILD_REF_NAME
except:
- develop
- master
tags:
- docker
job_publish_develop:
stage: publish
only:
- develop
script:
- ./gradlew publish
artifacts:
paths:
- swagger-confluence-cli/build/libs/*.jar
- swagger-confluence-core/build/libs/*.jar
- swagger-confluence-gradle-plugin/build/libs/*.jar
tags:
- docker
job_publish_master:
stage: publish
only:
- master
script:
- ./gradlew publish -Prelease=true
artifacts:
paths:
- swagger-confluence-cli/build/libs/*.jar
- swagger-confluence-core/build/libs/*.jar
- swagger-confluence-gradle-plugin/build/libs/*.jar
tags:
- docker