diff --git a/.github/workflows/dashboards-notebooks-test-and-build-workflow.yml b/.github/workflows/dashboards-notebooks-test-and-build-workflow.yml index a951c86..711e64a 100644 --- a/.github/workflows/dashboards-notebooks-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-notebooks-test-and-build-workflow.yml @@ -39,7 +39,7 @@ jobs: - name: Move Notebooks to Plugins Dir run: mv dashboards-notebooks OpenSearch-Dashboards/plugins/dashboards-notebooks - - name: OpenSearch Dashboards Pluign Bootstrap + - name: OpenSearch Dashboards Plugin Bootstrap run: | cd OpenSearch-Dashboards/plugins/dashboards-notebooks yarn osd bootstrap diff --git a/.github/workflows/opensearch-notebooks-test-and-build-workflow.yml b/.github/workflows/opensearch-notebooks-test-and-build-workflow.yml index c0bd566..60eba98 100644 --- a/.github/workflows/opensearch-notebooks-test-and-build-workflow.yml +++ b/.github/workflows/opensearch-notebooks-test-and-build-workflow.yml @@ -3,9 +3,9 @@ name: Test and Build OpenSearch Notebooks Backend Plugin on: [push, pull_request] env: - OPENSEARCH_VERSION: '1.0' - COMMON_UTILS_VERSION: '1.0' - OPENSEARCH_PLUGIN_VERSION: 1.0.0.0 + OPENSEARCH_VERSION: '1.1.0-SNAPSHOT' + OPENSEARCH_BRANCH: '1.x' + COMMON_UTILS_BRANCH: 'main' jobs: build: @@ -25,26 +25,26 @@ jobs: with: repository: 'opensearch-project/OpenSearch' path: OpenSearch - ref: ${{ env.OPENSEARCH_VERSION }} + ref: ${{ env.OPENSEARCH_BRANCH }} - 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 with: - ref: ${{ env.COMMON_UTILS_VERSION }} repository: 'opensearch-project/common-utils' path: common-utils + ref: ${{ env.COMMON_UTILS_BRANCH }} - name: Build common-utils working-directory: ./common-utils - run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 + run: ./gradlew publishToMavenLocal -Dopensearch.version=${{ env.OPENSEARCH_VERSION }} - name: Build with Gradle run: | cd opensearch-notebooks - ./gradlew build -Dopensearch.version=1.0.0 + ./gradlew build -Dopensearch.version=${{ env.OPENSEARCH_VERSION }} - name: Create Artifact Path run: | diff --git a/opensearch-notebooks/build.gradle b/opensearch-notebooks/build.gradle index b1005a0..88ecbe2 100644 --- a/opensearch-notebooks/build.gradle +++ b/opensearch-notebooks/build.gradle @@ -29,7 +29,10 @@ import java.util.concurrent.Callable buildscript { ext { - opensearch_version = System.getProperty("opensearch.version", "1.0.0") + opensearch_version = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT") + // 1.0.0 -> 1.0.0.0, and 1.0.0-SNAPSHOT -> 1.0.0.0-SNAPSHOT + opensearch_build = opensearch_version.replaceAll(/(\.\d)([^\d]*)$/, '$1.0$2') + common_utils_version = System.getProperty("common_utils.version", opensearch_build) kotlin_version = System.getProperty("kotlin.version", "1.4.0") } @@ -112,14 +115,9 @@ ext { projectSubstitutions = [:] licenseFile = rootProject.file('LICENSE.txt') noticeFile = rootProject.file('NOTICE.txt') - opensearchVersion = "${version}" isSnapshot = "true" == System.getProperty("build.snapshot", "true") } -if (isSnapshot) { - version += "-SNAPSHOT" -} - plugins.withId('java') { sourceCompatibility = targetCompatibility = "1.8" } @@ -130,7 +128,11 @@ plugins.withId('org.jetbrains.kotlin.jvm') { allprojects { group = "org.opensearch" - version = "${opensearchVersion}.0" + + version = "${opensearch_version}" - "-SNAPSHOT" + ".0" + if (isSnapshot) { + version += "-SNAPSHOT" + } plugins.withId('java') { sourceCompatibility = targetCompatibility = "1.8" @@ -142,7 +144,7 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" compile "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}" compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9" - compile "${group}:common-utils:${version}" + compile "${group}:common-utils:${common_utils_version}" compile group: 'com.google.guava', name: 'guava', version: '15.0' testImplementation( 'org.assertj:assertj-core:3.16.1', diff --git a/opensearch-notebooks/gradle.properties b/opensearch-notebooks/gradle.properties deleted file mode 100644 index 3ba5202..0000000 --- a/opensearch-notebooks/gradle.properties +++ /dev/null @@ -1,27 +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