-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathJenkinsfile
44 lines (43 loc) · 1.56 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
pipeline {
agent any
stages {
stage('Preparation') { // for display purposes
steps {
// Get code from GitHub repository
git 'https://github.com/ProjectIndoor/projectindoorweb'
}
}
stage('Build') {
steps {
script { //wrap in script to make it compatible with blue ocean syntax
// Run the gradle build
if (isUnix()) {
sh "./gradlew clean clientInstall build --info"
} else {
bat "./gradlew.bat clean clientInstall build --info"
}
}
}
}
stage('Check') {
steps{
// Collect checkstyle findbugs and pmd results
step([$class: "CheckStylePublisher",
canComputeNew: false,
defaultEncoding: "",
healthy: "",
pattern: "build/reports/checkstyle/main.xml",
unHealthy: ""])
findbugs canComputeNew: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', pattern: 'build/reports/findbugs/main.xml', unHealthy: ''
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: 'build/reports/pmd/main.xml', unHealthy: ''
junit 'build/test-results/test/*.xml'
}
}
}
post {
failure {
// Send a slack message when a build fails
slackSend color: '#FF5555', message: 'Build failed!'
}
}
}