-
Notifications
You must be signed in to change notification settings - Fork 21
/
Jenkinsfile
84 lines (82 loc) · 3.42 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
81
82
83
84
// do no bother launching Gradle Daemon
def gradleOptions = ['--no-daemon']
// do not print the Welcome Gradle message. Seems pointless in CI
gradleOptions += "-Dorg.gradle.internal.launcher.welcomeMessageEnabled=false"
// more logs for troubleshooting
gradleOptions += "--info"
// tell gradle-intellij-plugin not to download sources
def extraEnv = ["CI=true"]
pipeline {
agent none
options {
buildDiscarder(logRotator(numToKeepStr: '20'))
}
stages {
stage('Platform Matrix Build') {
matrix {
axes {
axis {
name 'PLATFORM'
values 'linux', 'windows'
}
}
agent { label "${PLATFORM}" }
options {
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('Build Plugin') {
steps {
script {
String command = "gradlew ${gradleOptions.join ' '} check assemble"
if (isUnix()) {
command = "./${command}"
}
infra.runWithJava(command, "17", extraEnv)
}
}
post {
always {
junit('**/build/test-results/**/*.xml')
}
}
}
stage('Verify Plugin') {
steps {
script {
String command = "gradlew ${gradleOptions.join ' '} verifyPlugin runPluginVerifier"
if (isUnix()) {
command = "./" + command
}
infra.runWithJava(command, "17", extraEnv)
}
archiveArtifacts artifacts: '**/build/reports/pluginVerifier/**', fingerprint: false
// Look for presence of compatibility warnings or problems
sh "./script/check-plugin-verification.sh"
}
post {
always {
discoverGitReferenceBuild()
recordIssues(tool: java(pattern: 'build/javac.log'),
sourceCodeEncoding: 'UTF-8',
skipBlames: true)
recordIssues(tool: taskScanner(
includePattern: '**/*.java',
excludePattern: '**/build/**,gradle/**,.gradle/**',
highTags: 'FIXME',
normalTags: 'TODO'),
sourceCodeEncoding: 'UTF-8',
skipBlames: true)
}
}
when {
expression {
return isUnix()
}
}
}
}
}
}
}
}