diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index ce31a0071..9faa8d44e 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -26,10 +26,10 @@ jobs: with: repository: 'opensearch-project/OpenSearch' path: OpenSearch - ref: '1.0' + ref: '1.x' - name: Build OpenSearch working-directory: ./OpenSearch - run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false + run: ./gradlew publishToMavenLocal # dependencies: common-utils - name: Checkout common-utils uses: actions/checkout@v2 @@ -39,32 +39,22 @@ jobs: ref: 'main' - name: Build common-utils working-directory: ./common-utils - run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false + run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT # dependencies: job-scheduler - name: Checkout job-scheduler uses: actions/checkout@v2 with: repository: 'opensearch-project/job-scheduler' path: job-scheduler - ref: '1.0' + ref: 'main' - name: Build job-scheduler working-directory: ./job-scheduler - run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false - # dependencies: alerting-notification - - name: Checkout alerting - uses: actions/checkout@v2 - with: - repository: 'opensearch-project/alerting' - path: alerting - ref: '1.0' - - name: Build alerting - working-directory: ./alerting - run: ./gradlew :alerting-notification:publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false + run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT # index-management - name: Checkout Branch uses: actions/checkout@v2 - name: Run integration tests with multi node config - run: ./gradlew integTest -PnumNodes=3 + run: ./gradlew integTest -PnumNodes=3 -Dopensearch.version=1.1.0-SNAPSHOT - name: Upload failed logs uses: actions/upload-artifact@v2 if: failure() diff --git a/.github/workflows/test-and-build-workflow.yml b/.github/workflows/test-and-build-workflow.yml index 0dffb8d5f..e5782091c 100644 --- a/.github/workflows/test-and-build-workflow.yml +++ b/.github/workflows/test-and-build-workflow.yml @@ -26,10 +26,10 @@ jobs: with: repository: 'opensearch-project/OpenSearch' path: OpenSearch - ref: '1.0' + ref: '1.x' - name: Build OpenSearch working-directory: ./OpenSearch - run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false + run: ./gradlew publishToMavenLocal # dependencies: common-utils - name: Checkout common-utils uses: actions/checkout@v2 @@ -39,32 +39,22 @@ jobs: ref: 'main' - name: Build common-utils working-directory: ./common-utils - run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false + run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT # dependencies: job-scheduler - name: Checkout job-scheduler uses: actions/checkout@v2 with: repository: 'opensearch-project/job-scheduler' path: job-scheduler - ref: '1.0' + ref: 'main' - name: Build job-scheduler working-directory: ./job-scheduler - run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false - # dependencies: alerting-notification - - name: Checkout alerting - uses: actions/checkout@v2 - with: - repository: 'opensearch-project/alerting' - path: alerting - ref: '1.0' - - name: Build alerting - working-directory: ./alerting - run: ./gradlew :alerting-notification:publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false - # index-management + run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT + # build index management - name: Checkout Branch uses: actions/checkout@v2 - name: Build with Gradle - run: ./gradlew build + run: ./gradlew build -Dopensearch.version=1.1.0-SNAPSHOT - name: Upload failed logs uses: actions/upload-artifact@v2 if: failure() diff --git a/.gitignore b/.gitignore index 4f755f873..79f0b4012 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ out/ *.iws .DS_Store *.log -http \ No newline at end of file +http +.project +.settings \ No newline at end of file diff --git a/build.gradle b/build.gradle index febf287cc..a6a03e0f5 100644 --- a/build.gradle +++ b/build.gradle @@ -31,7 +31,11 @@ import java.util.function.Predicate buildscript { ext { - opensearch_version = System.getProperty("opensearch.version", "1.0.0") + opensearch_version = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT") + // 1.1.0 -> 1.1.0.0, and 1.1.0-SNAPSHOT -> 1.1.0.0-SNAPSHOT + opensearch_build = opensearch_version.replaceAll(/(\.\d)([^\d]*)$/, '$1.0$2') + common_utils_version = System.getProperty("common_utils.version", opensearch_build) + job_scheduler_version = System.getProperty("job_scheduler_version.version", opensearch_build) kotlin_version = System.getProperty("kotlin.version", "1.4.0") } @@ -139,25 +143,29 @@ configurations.testCompile { ext { projectSubstitutions = [:] - opensearchVersion = "${version}" isSnapshot = "true" == System.getProperty("build.snapshot", "true") licenseFile = rootProject.file('LICENSE') noticeFile = rootProject.file('NOTICE') } -group = "org.opensearch" -version = "${opensearchVersion}.0" +allprojects { + group = "org.opensearch" + version = "${opensearch_version}" - "-SNAPSHOT" + ".0" + if (isSnapshot) { + version += "-SNAPSHOT" + } +} dependencies { compileOnly "org.opensearch:opensearch:${opensearch_version}" - compileOnly "org.opensearch:opensearch-job-scheduler-spi:1.0.0.0" + compileOnly "org.opensearch:opensearch-job-scheduler-spi:${job_scheduler_version}" compile group: 'commons-codec', name: 'commons-codec', version: '1.13' compile "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" compile "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}" compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}" compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9' compile "org.jetbrains:annotations:13.0" - compile "org.opensearch:common-utils:1.0.0.0" + compile "org.opensearch:common-utils:${common_utils_version}" compile "com.github.seancfoley:ipaddress:5.3.3" testCompile "org.opensearch.test:framework:${opensearch_version}" @@ -176,10 +184,6 @@ repositories { mavenLocal() } -if (isSnapshot) { - version += "-SNAPSHOT" -} - plugins.withId('java') { sourceCompatibility = targetCompatibility = "1.8" } diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index 43ca52b80..000000000 --- a/gradle.properties +++ /dev/null @@ -1,26 +0,0 @@ -# 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. -# - -# -# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"). -# You may not use this file except in compliance with the License. -# A copy of the License is located at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# or in the "license" file accompanying this file. This file 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. -# - -version = 1.0.0 diff --git a/src/test/resources/index-management/opendistro-index-management-1.13.0.0.zip b/src/test/resources/index-management/opendistro-index-management-1.13.0.0.zip deleted file mode 100644 index 1a09c750d..000000000 Binary files a/src/test/resources/index-management/opendistro-index-management-1.13.0.0.zip and /dev/null differ diff --git a/src/test/resources/job-scheduler/opensearch-job-scheduler-1.0.0.0.zip b/src/test/resources/job-scheduler/opensearch-job-scheduler-1.0.0.0.zip deleted file mode 100644 index ba9cb7c61..000000000 Binary files a/src/test/resources/job-scheduler/opensearch-job-scheduler-1.0.0.0.zip and /dev/null differ diff --git a/src/test/resources/job-scheduler/opensearch-job-scheduler-1.1.0.0-SNAPSHOT.zip b/src/test/resources/job-scheduler/opensearch-job-scheduler-1.1.0.0-SNAPSHOT.zip new file mode 100644 index 000000000..4c537d0d2 Binary files /dev/null and b/src/test/resources/job-scheduler/opensearch-job-scheduler-1.1.0.0-SNAPSHOT.zip differ diff --git a/src/test/resources/notifications/opensearch-notifications-1.0.0.zip b/src/test/resources/notifications/opensearch-notifications-1.1.0.0-SNAPSHOT.zip similarity index 54% rename from src/test/resources/notifications/opensearch-notifications-1.0.0.zip rename to src/test/resources/notifications/opensearch-notifications-1.1.0.0-SNAPSHOT.zip index 921083dab..bf5317298 100644 Binary files a/src/test/resources/notifications/opensearch-notifications-1.0.0.zip and b/src/test/resources/notifications/opensearch-notifications-1.1.0.0-SNAPSHOT.zip differ diff --git a/src/test/resources/security/opensearch-security-1.0.0.0.zip b/src/test/resources/security/opensearch-security-1.0.0.0.zip deleted file mode 100644 index 1f763dc4d..000000000 Binary files a/src/test/resources/security/opensearch-security-1.0.0.0.zip and /dev/null differ