2021-04-09 15:28:18 -04:00
|
|
|
/*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* The OpenSearch Contributors require contributions made to
|
|
|
|
* this file be licensed under the Apache-2.0 license or a
|
|
|
|
* compatible open source license.
|
|
|
|
*
|
|
|
|
* Modifications Copyright OpenSearch Contributors. See
|
|
|
|
* GitHub history for details.
|
|
|
|
*/
|
|
|
|
|
2018-02-14 01:49:53 -05:00
|
|
|
/*
|
|
|
|
* Licensed to Elasticsearch under one or more contributor
|
|
|
|
* license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright
|
|
|
|
* ownership. Elasticsearch licenses this file to you under
|
|
|
|
* the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
* not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*/
|
|
|
|
|
2021-03-16 04:53:48 -04:00
|
|
|
apply plugin: 'opensearch.internal-distribution-archive-setup'
|
2018-02-21 20:46:40 -05:00
|
|
|
|
2021-02-22 18:08:15 -05:00
|
|
|
CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String platform, String architecture, boolean jdk) {
|
2018-02-21 20:46:40 -05:00
|
|
|
return copySpec {
|
2021-03-16 04:53:48 -04:00
|
|
|
into("opensearch-${version}") {
|
2018-05-25 07:56:35 -04:00
|
|
|
into('lib') {
|
2021-02-22 18:08:15 -05:00
|
|
|
with libFiles()
|
2018-05-25 07:56:35 -04:00
|
|
|
}
|
2018-02-14 01:49:53 -05:00
|
|
|
into('config') {
|
|
|
|
dirMode 0750
|
|
|
|
fileMode 0660
|
2021-02-22 18:08:15 -05:00
|
|
|
with configFiles(distributionType, jdk)
|
2020-02-08 18:50:14 -05:00
|
|
|
from {
|
|
|
|
dirMode 0750
|
|
|
|
jvmOptionsDir.getParent()
|
|
|
|
}
|
2018-02-14 01:49:53 -05:00
|
|
|
}
|
|
|
|
into('bin') {
|
2021-02-22 18:08:15 -05:00
|
|
|
with binFiles(distributionType, jdk)
|
2018-02-14 01:49:53 -05:00
|
|
|
}
|
2019-03-15 03:55:15 -04:00
|
|
|
if (jdk) {
|
2019-10-31 15:28:30 -04:00
|
|
|
into("darwin".equals(platform) ? 'jdk.app' : 'jdk') {
|
2020-03-22 11:58:11 -04:00
|
|
|
with jdkFiles(project, platform, architecture)
|
2019-03-08 14:04:18 -05:00
|
|
|
}
|
|
|
|
}
|
2018-02-14 01:49:53 -05:00
|
|
|
into('') {
|
|
|
|
from {
|
|
|
|
dirMode 0755
|
2018-02-21 20:46:40 -05:00
|
|
|
logsDir.getParent()
|
2018-02-14 01:49:53 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
into('') {
|
|
|
|
from {
|
|
|
|
dirMode 0755
|
2018-02-21 20:46:40 -05:00
|
|
|
pluginsDir.getParent()
|
2018-02-14 01:49:53 -05:00
|
|
|
}
|
|
|
|
}
|
2018-04-10 16:58:49 -04:00
|
|
|
from(rootProject.projectDir) {
|
2019-12-19 18:55:38 -05:00
|
|
|
include 'README.asciidoc'
|
2018-04-10 16:58:49 -04:00
|
|
|
}
|
|
|
|
from(rootProject.file('licenses')) {
|
2021-01-30 01:23:18 -05:00
|
|
|
include 'APACHE-LICENSE-2.0.txt'
|
2018-04-10 16:58:49 -04:00
|
|
|
rename { 'LICENSE.txt' }
|
|
|
|
}
|
|
|
|
|
2021-02-22 18:08:15 -05:00
|
|
|
with noticeFile(jdk)
|
2018-02-23 11:03:17 -05:00
|
|
|
into('modules') {
|
|
|
|
with modulesFiles
|
2018-02-14 01:49:53 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-02-21 20:46:40 -05:00
|
|
|
|
2020-09-10 02:08:50 -04:00
|
|
|
distribution_archives {
|
|
|
|
integTestZip {
|
|
|
|
content {
|
2021-02-22 18:08:15 -05:00
|
|
|
archiveFiles(transportModulesFiles, 'zip', null, 'x64', false)
|
2020-09-10 02:08:50 -04:00
|
|
|
}
|
|
|
|
}
|
2019-03-15 03:55:15 -04:00
|
|
|
|
2020-09-10 02:08:50 -04:00
|
|
|
ossWindowsZip {
|
|
|
|
archiveClassifier = 'windows-x86_64'
|
|
|
|
content {
|
2021-02-22 18:08:15 -05:00
|
|
|
archiveFiles(modulesFiles('windows-x86_64'), 'zip', 'windows', 'x64', true)
|
2020-09-10 02:08:50 -04:00
|
|
|
}
|
|
|
|
}
|
2018-02-23 11:03:17 -05:00
|
|
|
|
2020-09-10 02:08:50 -04:00
|
|
|
ossNoJdkWindowsZip {
|
|
|
|
archiveClassifier = 'no-jdk-windows-x86_64'
|
|
|
|
content {
|
2021-02-22 18:08:15 -05:00
|
|
|
archiveFiles(modulesFiles('windows-x86_64'), 'zip', 'windows', 'x64', false)
|
2020-09-10 02:08:50 -04:00
|
|
|
}
|
|
|
|
}
|
2018-02-23 11:03:17 -05:00
|
|
|
|
2020-09-10 02:08:50 -04:00
|
|
|
ossDarwinTar {
|
|
|
|
archiveClassifier = 'darwin-x86_64'
|
|
|
|
content {
|
2021-02-22 18:08:15 -05:00
|
|
|
archiveFiles(modulesFiles('darwin-x86_64'), 'tar', 'darwin', 'x64', true)
|
2020-09-10 02:08:50 -04:00
|
|
|
}
|
|
|
|
}
|
2019-03-15 03:55:15 -04:00
|
|
|
|
2020-09-10 02:08:50 -04:00
|
|
|
ossNoJdkDarwinTar {
|
|
|
|
archiveClassifier = 'no-jdk-darwin-x86_64'
|
|
|
|
content {
|
2021-02-22 18:08:15 -05:00
|
|
|
archiveFiles(modulesFiles('darwin-x86_64'), 'tar', 'darwin', 'x64', false)
|
2020-09-10 02:08:50 -04:00
|
|
|
}
|
|
|
|
}
|
2020-03-22 11:58:11 -04:00
|
|
|
|
2020-09-10 02:08:50 -04:00
|
|
|
ossLinuxAarch64Tar {
|
|
|
|
archiveClassifier = 'linux-aarch64'
|
|
|
|
content {
|
2021-02-22 18:08:15 -05:00
|
|
|
archiveFiles(modulesFiles('linux-aarch64'), 'tar', 'linux', 'aarch64', true)
|
2020-09-10 02:08:50 -04:00
|
|
|
}
|
|
|
|
}
|
2019-01-29 14:18:30 -05:00
|
|
|
|
2020-09-10 02:08:50 -04:00
|
|
|
ossLinuxTar {
|
|
|
|
archiveClassifier = 'linux-x86_64'
|
|
|
|
content {
|
2021-02-22 18:08:15 -05:00
|
|
|
archiveFiles(modulesFiles('linux-x86_64'), 'tar', 'linux', 'x64', true)
|
2020-09-10 02:08:50 -04:00
|
|
|
}
|
|
|
|
}
|
2019-03-15 03:55:15 -04:00
|
|
|
|
2020-09-10 02:08:50 -04:00
|
|
|
ossNoJdkLinuxTar {
|
|
|
|
archiveClassifier = 'no-jdk-linux-x86_64'
|
|
|
|
content {
|
2021-02-22 18:08:15 -05:00
|
|
|
archiveFiles(modulesFiles('linux-x86_64'), 'tar', 'linux', 'x64', false)
|
2020-09-10 02:08:50 -04:00
|
|
|
}
|
|
|
|
}
|
2018-02-21 20:46:40 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
subprojects {
|
|
|
|
apply plugin: 'distribution'
|
2021-03-16 04:53:48 -04:00
|
|
|
apply plugin: 'opensearch.internal-distribution-archive-check'
|
2020-08-26 09:04:12 -04:00
|
|
|
|
2021-03-16 04:53:48 -04:00
|
|
|
group = "org.opensearch.distribution.oss"
|
2019-05-08 07:00:11 -04:00
|
|
|
}
|