Skip to content

Commit

Permalink
Remove checked-in ml-commons dependency (#529)
Browse files Browse the repository at this point in the history
Signed-off-by: jackieyanghan <jkhanjob@gmail.com>
  • Loading branch information
jackiehanyang committed Apr 5, 2022
1 parent 20bff4c commit d85f861
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion doctest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ doctest.finalizedBy stopOpenSearch
build.dependsOn doctest
clean.dependsOn(cleanBootstrap)

String mlCommonsRemoteFile = 'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.1/latest/linux/x64/builds/opensearch/plugins/opensearch-ml-1.3.1.0.zip'
String mlCommonsPlugin = "ml-commons"

testClusters {
docTestCluster {
plugin(provider(new Callable<RegularFile>(){
Expand All @@ -56,7 +59,15 @@ testClusters {
return new RegularFile() {
@Override
File getAsFile() {
return fileTree("resources/ml-commons").getSingleFile()
File dir = new File('./doctest/' + mlCommonsPlugin)
if (!dir.exists()) {
dir.mkdirs()
}
File f = new File(mlCommonsPlugin, dir)
if (!f.exists()) {
new URL(mlCommonsRemoteFile).withInputStream{ ins -> f.withOutputStream{ it << ins }}
}
return fileTree(mlCommonsPlugin).getSingleFile()
}
}
}
Expand Down

0 comments on commit d85f861

Please sign in to comment.