/* * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ apply plugin: 'nebula.ospackage' // This is afterEvaluate because the bundlePlugin ZIP task is updated afterEvaluate and changes the ZIP name to match the plugin name afterEvaluate { ospackage { packageName = "${name}" release = isSnapshot ? "0.1" : '1' version = "${project.version}" - "-SNAPSHOT" into '/usr/share/opensearch/plugins' from(zipTree(bundlePlugin.archivePath)) { into opensearchplugin.name } user 'root' permissionGroup 'root' fileMode 0644 dirMode 0755 requires('opensearch-oss', versions.opensearch, EQUAL) packager = 'Amazon' vendor = 'Amazon' os = 'LINUX' prefix '/usr' license 'ASL-2.0' maintainer 'OpenSearch Team ' url 'https://opensearch.org/downloads.html' summary ''' OpenSearch reports scheduler. Reference documentation can be found at https://docs-beta.opensearch.org/. '''.stripIndent().replace('\n', ' ').trim() } buildRpm { arch = 'NOARCH' 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 = '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") } } } }