Skip to content

Commit f1e9c44

Browse files
Jenkinsfile: run JDK tests on same agent, preventing deadlocks.
1 parent 941156f commit f1e9c44

File tree

1 file changed

+3
-43
lines changed

1 file changed

+3
-43
lines changed

Jenkinsfile

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -65,46 +65,10 @@ pipeline {
6565
}
6666
}
6767

68-
// Note: currently not using matrix build because if builds run in parallel they can block each other.
69-
// Maybe use throttle plugin?
70-
// stage("test-jdks") {
71-
// matrix {
72-
// axes {
73-
// axis {
74-
// name "TEST_JDK"
75-
// values "8", "16"
76-
// }
77-
// }
78-
// stages {
79-
// stage("test") {
80-
// // Set agent to start with new workspace to avoid Gradle compile issues on shared workspace
81-
// agent {
82-
// label 'java'
83-
// }
84-
// environment {
85-
// TEST_JDK = "${TEST_JDK}"
86-
// }
87-
// steps {
88-
// // "|| true" for an OK exit code if no file is found
89-
// sh 'rm tests/objectbox-java-test/hs_err_pid*.log || true'
90-
// // Note: do not run check task as it includes SpotBugs.
91-
// sh "./ci/test-with-asan.sh $gradleArgs $gitlabRepoArgs clean :tests:objectbox-java-test:test"
92-
// }
93-
// post {
94-
// always {
95-
// junit '**/build/test-results/**/TEST-*.xml'
96-
// archiveArtifacts artifacts: 'tests/*/hs_err_pid*.log', allowEmptyArchive: true // Only on JVM crash.
97-
// }
98-
// }
99-
// }
100-
// }
101-
// }
102-
// }
68+
// Test oldest supported and a recent JDK.
69+
// Note: can not run these in parallel using a matrix configuration as Gradle would step over itself.
70+
// Also shouldn't add agent config to avoid that as it triggers a separate job which can easily cause deadlocks.
10371
stage("test-jdk-8") {
104-
// Set agent to start with new workspace to avoid Gradle compile issues on shared workspace
105-
agent {
106-
label 'java'
107-
}
10872
environment {
10973
TEST_JDK = "8"
11074
}
@@ -122,10 +86,6 @@ pipeline {
12286
}
12387
}
12488
stage("test-jdk-16") {
125-
// Set agent to start with new workspace to avoid Gradle compile issues on shared workspace
126-
agent {
127-
label 'java'
128-
}
12989
environment {
13090
TEST_JDK = "16"
13191
}

0 commit comments

Comments
 (0)