GeezerVison is showing github.com — Jenkinsfile: run JDK tests on same agent, preventing deadlocks. · zhoupan/objectbox-java@f1e9c44
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: Jenkinsfile +3-43Lines changed: 3 additions & 43 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -65,46 +65,10 @@ pipeline { |
65 | 65 | } |
66 | 66 | } |
67 | 67 |
|
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. |
103 | 71 | 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 | | - } |
108 | 72 | environment { |
109 | 73 | TEST_JDK = "8" |
110 | 74 | } |
@@ -122,10 +86,6 @@ pipeline { |
122 | 86 | } |
123 | 87 | } |
124 | 88 | 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 | | - } |
129 | 89 | environment { |
130 | 90 | TEST_JDK = "16" |
131 | 91 | } |
|