Skip to content

Commit 26bc929

Browse files
committed
Jenkinsfile: dedicated init stage, archive hs_err_pid files if any
1 parent 3a8c7f7 commit 26bc929

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Jenkinsfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,23 @@ pipeline {
88
}
99

1010
stages {
11-
stage('build-java') {
11+
stage('init') {
1212
steps {
1313
// Copied file exists on CI server only
1414
sh 'cp /var/my-private-files/private.properties ./gradle.properties'
1515

1616
sh 'chmod +x gradlew'
1717

18+
sh 'rm tests/objectbox-java-test/hs_err_pid*.log || true' // "|| true" for an OK exit code if no file is found
19+
}
20+
}
21+
22+
stage('build-java') {
23+
steps {
1824
sh './gradlew --stacktrace ' +
1925
'-Dextensive-tests=true ' +
20-
'clean build uploadArchives -PpreferedRepo=local'
26+
'-PpreferedRepo=local ' +
27+
'clean build uploadArchives'
2128
}
2229
}
2330

@@ -27,6 +34,7 @@ pipeline {
2734
post {
2835
always {
2936
junit '**/build/test-results/**/TEST-*.xml'
37+
archive 'tests/*/hs_err_pid*.log'
3038
}
3139

3240
changed {

0 commit comments

Comments
 (0)