Skip to content

Commit 4ebcdff

Browse files
committed
Add prepareBwcTests
Signed-off-by: Craig Perkins <cwperx@amazon.com>
1 parent 77e61d7 commit 4ebcdff

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

build.gradle

+14-13
Original file line numberDiff line numberDiff line change
@@ -760,23 +760,24 @@ ext.resolvebwcZipFile = { pluginId ->
760760
}
761761
}
762762

763-
List<Provider<RegularFile>> plugins = [
764-
provider(new Callable<RegularFile>(){
765-
@Override
766-
RegularFile call() throws Exception {
767-
return new RegularFile() {
768-
@Override
769-
File getAsFile() {
770-
return fileTree(bwcFilePath + "anomaly-detection/" + project.version).getSingleFile()
771-
}
772-
}
773-
}
774-
})
775-
]
763+
List<Provider<RegularFile>> plugins = []
764+
765+
// Ensure the artifact for the current project version is available to be used for the bwc tests
766+
767+
task prepareBwcTests {
768+
dependsOn bundlePlugin
769+
doLast {
770+
plugins = [
771+
provider(jobSchedulerFile),
772+
project.getObjects().fileProperty().value(project.tasks.bundlePlugin.archiveFile)
773+
]
774+
}
775+
}
776776

777777
// Creates 2 test clusters with 3 nodes of the old version.
778778
2.times {i ->
779779
task "${baseName}#oldVersionClusterTask$i"(type: RestIntegTestTask) {
780+
dependsOn 'prepareBwcTests'
780781
useCluster testClusters."${baseName}$i"
781782
filter {
782783
includeTestsMatching "org.opensearch.ad.bwc.*IT"

0 commit comments

Comments
 (0)