Skip to content

Commit

Permalink
Pull Job scheduler from maven instead of jenkins (#663)
Browse files Browse the repository at this point in the history
* use maven

Signed-off-by: Derek Ho <[email protected]>

* bwc version to 2.7.0 bump

Signed-off-by: Derek Ho <[email protected]>

* hard code zips

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Rupal Mahajan <[email protected]>
  • Loading branch information
derek-ho authored and rupal-bq committed Mar 29, 2023
1 parent 6c56603 commit eec04df
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ configurations {
ktlint
testCompile
testRuntime
zipArchive
}

detekt {
Expand Down Expand Up @@ -167,6 +168,7 @@ repositories {
}

dependencies {
zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}"
implementation "org.opensearch:opensearch:${opensearch_version}"
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}"
Expand Down Expand Up @@ -293,8 +295,6 @@ Zip bundle = (Zip) project.getTasks().getByName("bundlePlugin");
integTest.dependsOn(bundle)
integTest.getClusters().forEach{c -> c.plugin(project.getObjects().fileProperty().value(bundle.getArchiveFile()))}

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"

testClusters.integTest {
testDistribution = "INTEG_TEST"
// need to install job-scheduler first, need to assemble job-scheduler first
Expand All @@ -304,15 +304,7 @@ testClusters.integTest {
return new RegularFile() {
@Override
File getAsFile() {
File dir = new File("src/test/resources/job-scheduler")
if (!dir.exists()) {
dir.mkdirs()
}
File file = new File(dir, "opensearch-job-scheduler-" + opensearch_build + ".zip")
if (!file.exists()) {
new URL(jobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }}
}
return fileTree("src/test/resources/job-scheduler").getSingleFile()
return configurations.zipArchive.asFileTree.getSingleFile()
}
}
}
Expand Down

0 comments on commit eec04df

Please sign in to comment.