forked from cfmlprojects/runwar
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
48 lines (42 loc) · 1.11 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
pipeline {
agent any
stages {
stage('Preparation') { // for display purposes
// Get some code from a GitHub repository
git 'https://github.com/Ortus-Solutions/runwar.git'
}
stage('Build') {
if (isUnix()) {
sh "'$WORKSPACE/gradlew' publishRunwarPublicationToMavenRepository"
} else {
bat("$WORKSPACE/runwar" publishRunwarPublicationToMavenRepository)
}
}
stage('Results') {
junit '**/target/surefire-reports/TEST-*.xml'
archive 'dist/*.jar'
}
}
post {
always {
echo "Build completed. currentBuild.result = ${currentBuild.result}"
}
changed {
echo 'Build result changed'
script {
if(currentBuild.result == 'SUCCESS') {
echo 'Build has changed to SUCCESS status'
}
}
}
failure {
echo 'Build failed'
}
success {
echo 'Build was a success'
}
unstable {
echo 'Build has gone unstable'
}
}
}