Skip to content

Commit

Permalink
Adding job scheduler dependency in bwc tests
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Jain <[email protected]>
  • Loading branch information
vibrantvarun committed Jan 31, 2025
1 parent 9799c6c commit 0f1c070
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
23 changes: 23 additions & 0 deletions qa/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,19 @@ task pullOpensearchArtifact {
}
}

// Task to pull job scheduler plugin from archive
task pullJobSchedulerBwcPlugin {
doLast {
copy {
from(Path.of(tmp_dir.absolutePath, "opensearch-${neural_search_bwc_version_no_qualifier}", "plugins", "opensearch-job-scheduler"))
into Path.of(tmp_dir.absolutePath, "opensearch-job-scheduler")
}
}
}

// Task to pull ml plugin from archive
task pullMlCommonsBwcPlugin {
dependsOn "pullJobSchedulerBwcPlugin"
doLast {
copy {
from(Path.of(tmp_dir.absolutePath, "opensearch-${neural_search_bwc_version_no_qualifier}", "plugins", "opensearch-ml"))
Expand Down Expand Up @@ -164,9 +175,21 @@ task pullBwcPlugin {
}
}

// Task to zip opensearch-job-scheduler plugin from archive
task zipBwcJobSchedulerPlugin(type: Zip) {
dependsOn "pullJobSchedulerBwcPlugin"
from(Path.of(tmp_dir.absolutePath, "opensearch-ml"))
destinationDirectory = tmp_dir
archiveFileName = "opensearch-ml-${neural_search_bwc_version_no_qualifier}.zip"
doLast {
delete Path.of(tmp_dir.absolutePath, "opensearch-ml")
}
}

// Task to zip ml-commons plugin from archive
task zipBwcMlCommonsPlugin(type: Zip) {
dependsOn "pullMlCommonsBwcPlugin"
dependsOn "zipBwcJobSchedulerPlugin"
from(Path.of(tmp_dir.absolutePath, "opensearch-ml"))
destinationDirectory = tmp_dir
archiveFileName = "opensearch-ml-${neural_search_bwc_version_no_qualifier}.zip"
Expand Down
1 change: 1 addition & 0 deletions qa/restart-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ testClusters {
}
}else{
versions = [ext.neural_search_bwc_version, opensearch_version]
plugin(project.tasks.zipBwcJobSchedulerPlugin.archiveFile)
plugin(project.tasks.zipBwcMlCommonsPlugin.archiveFile)
plugin(project.tasks.zipBwcKnnPlugin.archiveFile)
plugin(project.tasks.zipBwcPlugin.archiveFile)
Expand Down
1 change: 1 addition & 0 deletions qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ testClusters {
}
}else{
versions = [ext.neural_search_bwc_version, opensearch_version]
plugin(project.tasks.zipBwcJobSchedulerPlugin.archiveFile)
plugin(project.tasks.zipBwcMlCommonsPlugin.archiveFile)
plugin(project.tasks.zipBwcKnnPlugin.archiveFile)
plugin(project.tasks.zipBwcPlugin.archiveFile)
Expand Down

0 comments on commit 0f1c070

Please sign in to comment.