Skip to content

Commit

Permalink
Adding custom plugin to publish zips to local repo (#229) (#230)
Browse files Browse the repository at this point in the history
Signed-off-by: Sagar Upadhyaya <[email protected]>

Co-authored-by: Sagar Upadhyaya <[email protected]>
  • Loading branch information
sgup432 and sgup432 authored Jun 14, 2022
1 parent 82ceb2b commit e5cfc3d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
24 changes: 24 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ allprojects {
}

apply plugin: 'opensearch.opensearchplugin'
apply plugin: 'opensearch.pluginzip'

licenseFile = rootProject.file('LICENSE.txt')
noticeFile = rootProject.file('NOTICE.txt')
Expand Down Expand Up @@ -144,6 +145,29 @@ project.afterEvaluate {
compileJava.options.compilerArgs.removeAll(['--release', version])
}

publishing {
publications {
pluginZip(MavenPublication) { publication ->
pom {
name = "performance-analyzer"
description = "OpenSearch performance-analyzer plugin"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
name = "OpenSearch"
url = "https://github.com/opensearch-project/performance-analyzer"
}
}
}
}
}
}

repositories {
mavenCentral()
mavenLocal()
Expand Down
3 changes: 3 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ fi
mkdir -p $OUTPUT/plugins
cp ./build/distributions/*.zip $OUTPUT/plugins

./gradlew publishPluginZipPublicationToZipStagingRepository -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
mkdir -p $OUTPUT/maven/org/opensearch
cp -r ./build/local-staging-repo/org/opensearch/. $OUTPUT/maven/org/opensearch

0 comments on commit e5cfc3d

Please sign in to comment.