Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Rename plugin for more consistent naming convention (#339)
Browse files Browse the repository at this point in the history
* Rename plugin name

* Change buildDeb arch from 'amd64' to 'all'

* Add artifact rename tasks for buildRpm and buildDeb
  • Loading branch information
qreshi authored Jan 26, 2021
1 parent 42506c2 commit 6ba2426
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion alerting/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (isSnapshot) {
}

esplugin {
name 'opendistro_alerting'
name 'opendistro-alerting'
description 'Amazon OpenDistro alerting plugin'
classname 'com.amazon.opendistroforelasticsearch.alerting.AlertingPlugin'
extendedPlugins = ['lang-painless']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class MonitorRestApiIT : AlertingRestTestCase() {
for (nodeInfo in nodesInfo.values) {
val plugins = nodeInfo["plugins"] as List<Map<String, Any>>
for (plugin in plugins) {
if (plugin["name"] == "opendistro_alerting") {
if (plugin["name"] == "opendistro-alerting") {
return
}
}
Expand Down
20 changes: 17 additions & 3 deletions build-tools/pkgbuild.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,27 @@ afterEvaluate {

buildRpm {
arch = 'NOARCH'
archiveName "${packageName}-${version}.rpm"
dependsOn 'assemble'
finalizedBy 'renameRpm'
task renameRpm(type: Copy) {
from("$buildDir/distributions")
into("$buildDir/distributions")
include archiveName
rename archiveName, "${packageName}-${version}.rpm"
doLast { delete file("$buildDir/distributions/$archiveName") }
}
}

buildDeb {
arch = 'amd64'
archiveName "${packageName}-${version}.deb"
arch = 'all'
dependsOn 'assemble'
finalizedBy 'renameDeb'
task renameDeb(type: Copy) {
from("$buildDir/distributions")
into("$buildDir/distributions")
include archiveName
rename archiveName, "${packageName}-${version}.deb"
doLast { delete file("$buildDir/distributions/$archiveName") }
}
}
}

0 comments on commit 6ba2426

Please sign in to comment.