Skip to content

Commit 008cd70

Browse files
committed
add Jenkinsfile
1 parent d6071fa commit 008cd70

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Jenkinsfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// https://jenkins.io/doc/book/pipeline/syntax/
2+
pipeline {
3+
agent any
4+
5+
stages {
6+
stage('build-java') {
7+
steps {
8+
// Copied file exists on CI server only
9+
sh 'cp /var/my-private-files/private.properties ./gradle.properties'
10+
11+
sh 'chmod +x gradlew'
12+
13+
sh './gradlew --stacktrace --debug ' +
14+
'-Dextensive-tests=true ' +
15+
'clean build uploadArchives -PpreferedRepo=local'
16+
}
17+
}
18+
19+
}
20+
21+
// For global vars see /jenkins/pipeline-syntax/globals
22+
post {
23+
always {
24+
junit '**/build/test-results/**/TEST-*.xml'
25+
}
26+
27+
changed {
28+
slackSend color: "good",
29+
message: "Changed to ${currentBuild.currentResult}: ${currentBuild.fullDisplayName}\n${env.BUILD_URL}"
30+
}
31+
32+
failure {
33+
slackSend color: "danger",
34+
message: "Failed: ${currentBuild.fullDisplayName}\n${env.BUILD_URL}"
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)