-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
120 lines (104 loc) · 3.02 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# This file is a template, and might need editing before it works on your project.
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Gradle.gitlab-ci.yml
# This is the Gradle build system for JVM applications
# https://gradle.org/
# https://github.com/gradle/gradle
image: gradle:8.7-jdk17
stages:
- build
- staticAnalysis
- test
- deploy
# Default build cache settings to extend from
.build_cached:
cache:
key: "gradle-build"
paths:
- .gradle/
- .idea/
policy: pull-push
gradle_build:
extends: .build_cached
stage: build
cache:
policy: pull-push
artifacts:
name: build
paths:
- build/
script:
- gradle clean
- gradle build testClasses -x spotlessCheck -x test -x integrationTest
build-interactive-rebase-jetbrains:
extends: .build_cached
needs:
- gradle_build
dependencies:
- gradle_build
stage: build
script:
gradle assemble
spotless-interactive-rebase-jetbrains:
#extends: .build_cached
needs:
- gradle_build
dependencies:
- gradle_build
stage: staticAnalysis
script:
gradle spotlessKotlinCheck
PMD-interactive-rebase-jetbrains:
#extends: .build_cached
needs:
- gradle_build
dependencies:
- gradle_build
stage: staticAnalysis
script:
gradle pmdMain pmdTest
unit-test-interactive-rebase-jetbrains:
needs:
- gradle_build
dependencies:
- gradle_build
stage: test
script:
- gradle test jacocoTestReport
- cat build/reports/jacoco/test/html/index.html | grep -Po "Total.*?([0-9]{1,3})%"
coverage: /([0-9]{1,3})%/
integration-test-interactive-rebase-jetbrains:
needs:
- gradle_build
dependencies:
- gradle_build
stage: test
script:
- gradle integrationTest --tests com.jetbrains.interactiveRebase.integrationTests.UseCase1Test
- gradle integrationTest --tests com.jetbrains.interactiveRebase.integrationTests.UseCase2Test
- gradle integrationTest --tests com.jetbrains.interactiveRebase.integrationTests.UseCase3Test
- gradle integrationTest --tests com.jetbrains.interactiveRebase.integrationTests.UseCase4Test
- gradle integrationTest --tests com.jetbrains.interactiveRebase.integrationTests.UseCase5Test
- gradle integrationTest --tests com.jetbrains.interactiveRebase.integrationTests.UseCase6Test
allow_failure: true
# only:
# - main
# - dev
deploy-interactive-rebase-jetbrains:
needs:
- gradle_build
- build-interactive-rebase-jetbrains
- spotless-interactive-rebase-jetbrains
- unit-test-interactive-rebase-jetbrains
dependencies:
- gradle_build
stage: deploy
script:
- gradle publishPlugin
only:
- main
allow_failure: true