@@ -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} "
@@ -292,8 +294,6 @@ Zip bundle = (Zip) project.getTasks().getByName("bundlePlugin");
292
294
integTest. dependsOn(bundle)
293
295
integTest. getClusters(). forEach {c -> c. plugin(project. getObjects(). fileProperty(). value(bundle. getArchiveFile()))}
294
296
295
- 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"
296
-
297
297
testClusters. integTest {
298
298
testDistribution = " INTEG_TEST"
299
299
// need to install job-scheduler first, need to assemble job-scheduler first
@@ -303,15 +303,7 @@ testClusters.integTest {
303
303
return new RegularFile () {
304
304
@Override
305
305
File getAsFile () {
306
- File dir = new File (" src/test/resources/job-scheduler" )
307
- if (! dir. exists()) {
308
- dir. mkdirs()
309
- }
310
- File file = new File (dir, " opensearch-job-scheduler-" + opensearch_build + " .zip" )
311
- if (! file. exists()) {
312
- new URL (jobSchedulerURL). withInputStream{ ins -> file. withOutputStream{ it << ins }}
313
- }
314
- return fileTree(" src/test/resources/job-scheduler" ). getSingleFile()
306
+ return configurations. zipArchive. asFileTree. getSingleFile()
315
307
}
316
308
}
317
309
}
@@ -333,12 +325,12 @@ testClusters.integTest {
333
325
}
334
326
335
327
// For job-scheduler and reports-scheduler, the latest opensearch releases appear to be 1.1.0.0.
336
- String baseVersion = " 2.6 .0"
328
+ String baseVersion = " 2.7 .0"
337
329
String bwcVersion = baseVersion + " .0"
338
330
String baseName = " reportsSchedulerBwcCluster"
339
331
String bwcFilePath = " src/test/resources/bwc"
340
- String bwcJobSchedulerURL = " https://ci.opensearch. org/ci/dbc/distribution-build-opensearch/ ${ baseVersion } /latest/linux/x64/tar/builds/ opensearch/plugins /opensearch-job-scheduler-${ bwcVersion } .zip"
341
- String bwcReportsSchedulerURL = " https://ci.opensearch. org/ci/dbc/distribution-build-opensearch/ ${ baseVersion } /latest/linux/x64/tar/builds/ opensearch/plugins /opensearch-reports-scheduler-${ bwcVersion } .zip"
332
+ String bwcJobSchedulerURL = " https://aws.oss.sonatype. org/content/repositories/snapshots/org/opensearch/plugin/ opensearch-job-scheduler/2.7.0.0-SNAPSHOT /opensearch-job-scheduler-2.7.0.0-20230305.020625-11 .zip"
333
+ String bwcReportsSchedulerURL = " https://aws.oss.sonatype. org/content/repositories/snapshots/org/opensearch/plugin/ opensearch-reports-scheduler/2.7.0.0-SNAPSHOT /opensearch-reports-scheduler-2.7.0.0-20230306.195720-1 .zip"
342
334
343
335
2. times {i ->
344
336
testClusters {
@@ -403,15 +395,7 @@ task prepareBwcTests {
403
395
return new RegularFile () {
404
396
@Override
405
397
File getAsFile () {
406
- File dir = new File (bwcFilePath + " /job-scheduler/" + project. version)
407
- if (! dir. exists()) {
408
- dir. mkdirs()
409
- }
410
- File file = new File (dir, " opensearch-reports-scheduler-" + project. version + " .zip" )
411
- if (! file. exists()) {
412
- new URL (jobSchedulerURL). withInputStream{ ins -> file. withOutputStream{ it << ins }}
413
- }
414
- return fileTree(bwcFilePath + " /job-scheduler/" + project. version). getSingleFile()
398
+ return configurations. zipArchive. asFileTree. getSingleFile()
415
399
}
416
400
}
417
401
}
0 commit comments