@@ -116,6 +116,7 @@ configurations {
116
116
ktlint
117
117
testCompile
118
118
testRuntime
119
+ zipArchive
119
120
}
120
121
121
122
detekt {
@@ -167,6 +168,7 @@ repositories {
167
168
}
168
169
169
170
dependencies {
171
+ zipArchive group : ' org.opensearch.plugin' , name :' opensearch-job-scheduler' , version : " ${ opensearch_build} "
170
172
implementation " org.opensearch:opensearch:${ opensearch_version} "
171
173
implementation " org.jetbrains.kotlin:kotlin-stdlib:${ kotlin_version} "
172
174
implementation " org.jetbrains.kotlin:kotlin-stdlib-common:${ kotlin_version} "
@@ -293,8 +295,6 @@ Zip bundle = (Zip) project.getTasks().getByName("bundlePlugin");
293
295
integTest. dependsOn(bundle)
294
296
integTest. getClusters(). forEach {c -> c. plugin(project. getObjects(). fileProperty(). value(bundle. getArchiveFile()))}
295
297
296
- String jobSchedulerURL = " https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_version. replace(" -SNAPSHOT" , " " ) + " /latest/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-" + opensearch_build. replace(" -SNAPSHOT" , " " ) + " .zip"
297
-
298
298
testClusters. integTest {
299
299
testDistribution = " INTEG_TEST"
300
300
// need to install job-scheduler first, need to assemble job-scheduler first
@@ -304,15 +304,7 @@ testClusters.integTest {
304
304
return new RegularFile () {
305
305
@Override
306
306
File getAsFile () {
307
- File dir = new File (" src/test/resources/job-scheduler" )
308
- if (! dir. exists()) {
309
- dir. mkdirs()
310
- }
311
- File file = new File (dir, " opensearch-job-scheduler-" + opensearch_build + " .zip" )
312
- if (! file. exists()) {
313
- new URL (jobSchedulerURL). withInputStream{ ins -> file. withOutputStream{ it << ins }}
314
- }
315
- return fileTree(" src/test/resources/job-scheduler" ). getSingleFile()
307
+ return configurations. zipArchive. asFileTree. getSingleFile()
316
308
}
317
309
}
318
310
}
0 commit comments