Skip to content

Commit

Permalink
Bump version 2.5.1, fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Chase Engelbrecht <[email protected]>
  • Loading branch information
engechas committed Mar 14, 2024
1 parent 1e9d5d8 commit 82f97a5
Showing 1 changed file with 18 additions and 44 deletions.
62 changes: 18 additions & 44 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.opensearch.gradle.test.RestIntegTestTask

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "2.5.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "2.5.1-SNAPSHOT")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
version_tokens = opensearch_version.tokenize('-')
Expand Down Expand Up @@ -125,6 +125,9 @@ repositories {
}

sourceSets.main.java.srcDirs = ['src/main/generated','src/main/java']
configurations {
zipArchive
}

dependencies {
javaRestTestImplementation project.sourceSets.main.runtimeClasspath
Expand All @@ -134,6 +137,11 @@ dependencies {
api "org.opensearch:common-utils:${common_utils_version}"
api "org.opensearch.client:opensearch-rest-client:${opensearch_version}"
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"

// Needed for integ tests
zipArchive group: 'org.opensearch.plugin', name:'alerting', version: "${opensearch_build}"
zipArchive group: 'org.opensearch.plugin', name:'opensearch-notifications-core', version: "${opensearch_build}"
zipArchive group: 'org.opensearch.plugin', name:'notifications', version: "${opensearch_build}"
}

// RPM & Debian build
Expand Down Expand Up @@ -209,15 +217,6 @@ integTest.getClusters().forEach{c -> {
c.plugin(project.getObjects().fileProperty().value(bundle.getArchiveFile()))
}}

String alertingFilePath = "src/test/resources/alerting"
String alertingPlugin = "opensearch-alerting-" + plugin_no_snapshot + ".zip"
String alertingRemoteFile = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_no_snapshot + "/latest/linux/x64/tar/builds/opensearch/plugins/" + alertingPlugin
String notificationsFilePath = "src/test/resources/notifications"
String notificationsCoreFilePath = "src/test/resources/notifications-core"
String notificationsPlugin = "opensearch-notifications-" + plugin_no_snapshot + ".zip"
String notificationsCorePlugin = "opensearch-notifications-core-" + plugin_no_snapshot + ".zip"
String notificationsRemoteFile = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_no_snapshot + "/latest/linux/x64/tar/builds/opensearch/plugins/" + notificationsPlugin
String notificationsCoreRemoteFile = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_no_snapshot + "/latest/linux/x64/tar/builds/opensearch/plugins/" + notificationsCorePlugin
testClusters.integTest {
testDistribution = 'ARCHIVE'

Expand All @@ -233,58 +232,33 @@ testClusters.integTest {
debugPort += 1
}
}
setting 'path.repo', repo.absolutePath
plugin(provider({
new RegularFile() {
@Override
File getAsFile() {
File dir = new File(rootDir.path + "/" + alertingFilePath)

if (!dir.exists()) {
dir.mkdirs()
}

File f = new File(dir, alertingPlugin)
if (!f.exists()) {
new URL(alertingRemoteFile).withInputStream{ ins -> f.withOutputStream{ it << ins }}
}
fileTree(alertingFilePath).getSingleFile()
return configurations.zipArchive.asFileTree.matching {
include '**/opensearch-notifications-core*'
}.singleFile
}
}
}))
plugin(provider({
new RegularFile() {
@Override
File getAsFile() {
File dir = new File(rootDir.path + "/" + notificationsCoreFilePath)

if (!dir.exists()) {
dir.mkdirs()
}

File f = new File(dir, notificationsCorePlugin)
if (!f.exists()) {
new URL(notificationsCoreRemoteFile).withInputStream{ ins -> f.withOutputStream{ it << ins }}
}
fileTree(notificationsCoreFilePath).getSingleFile()
return configurations.zipArchive.asFileTree.matching {
include '**/notifications*'
}.singleFile
}
}
}))
plugin(provider({
new RegularFile() {
@Override
File getAsFile() {
File dir = new File(rootDir.path + "/" + notificationsFilePath)

if (!dir.exists()) {
dir.mkdirs()
}

File f = new File(dir, notificationsPlugin)
if (!f.exists()) {
new URL(notificationsRemoteFile).withInputStream{ ins -> f.withOutputStream{ it << ins }}
}
fileTree(notificationsFilePath).getSingleFile()
return configurations.zipArchive.asFileTree.matching {
include '**/alerting*'
}.singleFile
}
}
}))
Expand Down

0 comments on commit 82f97a5

Please sign in to comment.