Skip to content

Commit c375a82

Browse files
committed
Find CCR QA sub-projects automatically (#33027)
Today we are by-hand maintaining a list of CCR QA sub-projects that the check task depends on. This commit simplifies this by finding these sub-projects automatically and adding their check task as dependencies of the CCR check task.
1 parent 74956ad commit c375a82

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

x-pack/plugin/ccr/build.gradle

+10-5
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,17 @@ task internalClusterTest(type: RandomizedTestingTask,
3232
systemProperty 'es.set.netty.runtime.available.processors', 'false'
3333
}
3434

35+
check.dependsOn internalClusterTest
3536
internalClusterTest.mustRunAfter test
36-
check.dependsOn(
37-
internalClusterTest,
38-
'qa:multi-cluster:followClusterTest',
39-
'qa:multi-cluster-with-incompatible-license:followClusterTest',
40-
'qa:multi-cluster-with-security:followClusterTest')
37+
38+
// add all sub-projects of the qa sub-project
39+
gradle.projectsEvaluated {
40+
project.subprojects
41+
.find { it.path == project.path + ":qa" }
42+
.subprojects
43+
.findAll { it.path.startsWith(project.path + ":qa") }
44+
.each { check.dependsOn it.check }
45+
}
4146

4247
dependencies {
4348
compileOnly "org.elasticsearch:elasticsearch:${version}"

0 commit comments

Comments
 (0)