@@ -6,7 +6,7 @@ import org.opensearch.gradle.test.RestIntegTestTask
6
6
7
7
buildscript {
8
8
ext {
9
- opensearch_version = System . getProperty(" opensearch.version" , " 2.5.0 -SNAPSHOT" )
9
+ opensearch_version = System . getProperty(" opensearch.version" , " 2.5.1 -SNAPSHOT" )
10
10
isSnapshot = " true" == System . getProperty(" build.snapshot" , " true" )
11
11
buildVersionQualifier = System . getProperty(" build.version_qualifier" , " " )
12
12
version_tokens = opensearch_version. tokenize(' -' )
@@ -125,6 +125,9 @@ repositories {
125
125
}
126
126
127
127
sourceSets. main. java. srcDirs = [' src/main/generated' ,' src/main/java' ]
128
+ configurations {
129
+ zipArchive
130
+ }
128
131
129
132
dependencies {
130
133
javaRestTestImplementation project. sourceSets. main. runtimeClasspath
@@ -134,6 +137,11 @@ dependencies {
134
137
api " org.opensearch:common-utils:${ common_utils_version} "
135
138
api " org.opensearch.client:opensearch-rest-client:${ opensearch_version} "
136
139
implementation " org.jetbrains.kotlin:kotlin-stdlib:${ kotlin_version} "
140
+
141
+ // Needed for integ tests
142
+ zipArchive group : ' org.opensearch.plugin' , name :' alerting' , version : " ${ opensearch_build} "
143
+ zipArchive group : ' org.opensearch.plugin' , name :' opensearch-notifications-core' , version : " ${ opensearch_build} "
144
+ zipArchive group : ' org.opensearch.plugin' , name :' notifications' , version : " ${ opensearch_build} "
137
145
}
138
146
139
147
// RPM & Debian build
@@ -209,15 +217,6 @@ integTest.getClusters().forEach{c -> {
209
217
c. plugin(project. getObjects(). fileProperty(). value(bundle. getArchiveFile()))
210
218
}}
211
219
212
- String alertingFilePath = " src/test/resources/alerting"
213
- String alertingPlugin = " opensearch-alerting-" + plugin_no_snapshot + " .zip"
214
- String alertingRemoteFile = " https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_no_snapshot + " /latest/linux/x64/tar/builds/opensearch/plugins/" + alertingPlugin
215
- String notificationsFilePath = " src/test/resources/notifications"
216
- String notificationsCoreFilePath = " src/test/resources/notifications-core"
217
- String notificationsPlugin = " opensearch-notifications-" + plugin_no_snapshot + " .zip"
218
- String notificationsCorePlugin = " opensearch-notifications-core-" + plugin_no_snapshot + " .zip"
219
- String notificationsRemoteFile = " https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_no_snapshot + " /latest/linux/x64/tar/builds/opensearch/plugins/" + notificationsPlugin
220
- String notificationsCoreRemoteFile = " https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_no_snapshot + " /latest/linux/x64/tar/builds/opensearch/plugins/" + notificationsCorePlugin
221
220
testClusters. integTest {
222
221
testDistribution = ' ARCHIVE'
223
222
@@ -233,58 +232,33 @@ testClusters.integTest {
233
232
debugPort + = 1
234
233
}
235
234
}
236
- setting ' path.repo' , repo. absolutePath
237
235
plugin(provider({
238
236
new RegularFile () {
239
237
@Override
240
238
File getAsFile () {
241
- File dir = new File (rootDir. path + " /" + alertingFilePath)
242
-
243
- if (! dir. exists()) {
244
- dir. mkdirs()
245
- }
246
-
247
- File f = new File (dir, alertingPlugin)
248
- if (! f. exists()) {
249
- new URL (alertingRemoteFile). withInputStream{ ins -> f. withOutputStream{ it << ins }}
250
- }
251
- fileTree(alertingFilePath). getSingleFile()
239
+ return configurations. zipArchive. asFileTree. matching {
240
+ include ' **/opensearch-notifications-core*'
241
+ }. singleFile
252
242
}
253
243
}
254
244
}))
255
245
plugin(provider({
256
246
new RegularFile () {
257
247
@Override
258
248
File getAsFile () {
259
- File dir = new File (rootDir. path + " /" + notificationsCoreFilePath)
260
-
261
- if (! dir. exists()) {
262
- dir. mkdirs()
263
- }
264
-
265
- File f = new File (dir, notificationsCorePlugin)
266
- if (! f. exists()) {
267
- new URL (notificationsCoreRemoteFile). withInputStream{ ins -> f. withOutputStream{ it << ins }}
268
- }
269
- fileTree(notificationsCoreFilePath). getSingleFile()
249
+ return configurations. zipArchive. asFileTree. matching {
250
+ include ' **/notifications*'
251
+ }. singleFile
270
252
}
271
253
}
272
254
}))
273
255
plugin(provider({
274
256
new RegularFile () {
275
257
@Override
276
258
File getAsFile () {
277
- File dir = new File (rootDir. path + " /" + notificationsFilePath)
278
-
279
- if (! dir. exists()) {
280
- dir. mkdirs()
281
- }
282
-
283
- File f = new File (dir, notificationsPlugin)
284
- if (! f. exists()) {
285
- new URL (notificationsRemoteFile). withInputStream{ ins -> f. withOutputStream{ it << ins }}
286
- }
287
- fileTree(notificationsFilePath). getSingleFile()
259
+ return configurations. zipArchive. asFileTree. matching {
260
+ include ' **/alerting*'
261
+ }. singleFile
288
262
}
289
263
}
290
264
}))
0 commit comments