-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
80 lines (79 loc) · 2.59 KB
/
Jenkinsfile
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
pipeline {
agent any
options {
timestamps()
ansiColor('xterm')
timeout(time: 15, unit: 'MINUTES')
disableConcurrentBuilds()
}
tools {
gradle 'gradle-7.5.0'
}
stages {
stage('Precondition') {
steps {
script {
def branch = env.CHANGE_BRANCH
def target = env.CHANGE_TARGET
if (target == 'master' && branch != 'develop') {
currentBuild.result = 'ABORTED'
error 'Only develop branch can be merged into master'
}
}
}
}
stage('Build') {
steps {
sh 'gradle --parallel assemble'
}
}
stage('Test') {
parallel {
stage('Utils') {
steps {
sh 'gradle utils:test'
}
}
stage('Readonly Collections') {
steps {
sh 'gradle readonly-collections:test'
}
}
stage('Binary Transcoders') {
steps {
sh 'gradle binary-transcoders:test'
}
}
stage('JVM Bridge') {
steps {
sh 'gradle jvm-bridge:test'
}
}
stage('I18N') {
steps {
sh 'gradle i18n:test'
}
}
}
post {
always {
junit checksName: 'Tests', allowEmptyResults: true, testResults: '**/build/test-results/test/TEST-*.xml'
recordCoverage sourceDirectories: [
[path: 'readonly-collections/src/main/kotlin'],
[path: 'readonly-collections/src/main/java'],
[path: 'utils/src/main/kotlin'],
[path: 'utils/src/main/java'],
[path: 'binary-transcoders/src/main/kotlin'],
[path: 'binary-transcoders/src/main/java'],
[path: 'jvm-bridge/src/main/kotlin'],
[path: 'jvm-bridge/src/main/java'],
[path: 'i18n/src/main/kotlin']
],
tools: [
[pattern: '**/build/reports/kover/report.xml']
]
}
}
}
}
}