diff --git a/.github/workflows/dashboards-notifications-test-and-build-workflow.yml b/.github/workflows/dashboards-notifications-test-and-build-workflow.yml index ddc00f01..2cd22997 100644 --- a/.github/workflows/dashboards-notifications-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-notifications-test-and-build-workflow.yml @@ -9,8 +9,8 @@ on: [pull_request, push] env: PLUGIN_NAME: notifications-dashboards - OPENSEARCH_DASHBOARDS_VERSION: 'main' - OPENSEARCH_PLUGIN_VERSION: 2.0.0.0 + OPENSEARCH_DASHBOARDS_VERSION: '2.x' + OPENSEARCH_PLUGIN_VERSION: 2.1.0.0 jobs: @@ -73,7 +73,6 @@ jobs: run: | cd OpenSearch-Dashboards/plugins/dashboards-notifications yarn build - mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip - name: Upload Artifact uses: actions/upload-artifact@v1 diff --git a/dashboards-notifications/opensearch_dashboards.json b/dashboards-notifications/opensearch_dashboards.json index a1b55acd..41c3d100 100644 --- a/dashboards-notifications/opensearch_dashboards.json +++ b/dashboards-notifications/opensearch_dashboards.json @@ -1,7 +1,7 @@ { "id": "notificationsDashboards", - "version": "2.0.0.0", - "opensearchDashboardsVersion": "2.0.0", + "version": "2.1.0.0", + "opensearchDashboardsVersion": "2.1.0", "requiredPlugins": ["navigation", "data"], "optionalPlugins": ["share"], "server": true, diff --git a/dashboards-notifications/package.json b/dashboards-notifications/package.json index d1651273..22c11c70 100644 --- a/dashboards-notifications/package.json +++ b/dashboards-notifications/package.json @@ -1,12 +1,12 @@ { "name": "notifications-dashboards", - "version": "2.0.0.0", + "version": "2.1.0.0", "description": "OpenSearch Dashboards Notifications Plugin", "license": "Apache-2.0", "main": "index.ts", - "opensearchDashboards": { - "version": "2.0.0", - "templateVersion": "1.0.0" + "config": { + "id": "notificationsDashboards", + "zip_name": "notifications-dashboards" }, "scripts": { "osd": "node ../../scripts/osd", @@ -17,7 +17,8 @@ "test:jest": "TZ=UTC ../../node_modules/.bin/jest --config ./test/jest.config.js", "cypress:run": "cypress run", "cypress:open": "cypress open", - "plugin_helpers": "node ../../scripts/plugin_helpers" + "plugin_helpers": "node ../../scripts/plugin_helpers", + "postbuild": "echo Renaming build artifact to [$npm_package_config_zip_name-$npm_package_version.zip] && mv build/$npm_package_config_id*.zip build/$npm_package_config_zip_name-$npm_package_version.zip" }, "dependencies": { "cypress": "^6.0.0" diff --git a/notifications/build.gradle b/notifications/build.gradle index 973080cc..ecadf430 100644 --- a/notifications/build.gradle +++ b/notifications/build.gradle @@ -6,10 +6,10 @@ buildscript { ext { - opensearch_version = System.getProperty("opensearch.version", "2.0.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "2.1.0-SNAPSHOT") isSnapshot = "true" == System.getProperty("build.snapshot", "true") buildVersionQualifier = System.getProperty("build.version_qualifier", "") - // 2.0.0-SNAPSHOT -> 2.0.0.0-SNAPSHOT + // 2.1.0-SNAPSHOT -> 2.1.0.0-SNAPSHOT version_tokens = opensearch_version.tokenize('-') opensearch_build = version_tokens[0] + '.0' if (buildVersionQualifier) { diff --git a/notifications/gradle/wrapper/gradle-wrapper.jar b/notifications/gradle/wrapper/gradle-wrapper.jar index 7454180f..41d9927a 100644 Binary files a/notifications/gradle/wrapper/gradle-wrapper.jar and b/notifications/gradle/wrapper/gradle-wrapper.jar differ diff --git a/notifications/gradle/wrapper/gradle-wrapper.properties b/notifications/gradle/wrapper/gradle-wrapper.properties index e750102e..aa991fce 100644 --- a/notifications/gradle/wrapper/gradle-wrapper.properties +++ b/notifications/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/notifications/notifications/src/test/kotlin/org/opensearch/integtest/PluginRestTestCase.kt b/notifications/notifications/src/test/kotlin/org/opensearch/integtest/PluginRestTestCase.kt index 80c95eaf..4e18d64c 100644 --- a/notifications/notifications/src/test/kotlin/org/opensearch/integtest/PluginRestTestCase.kt +++ b/notifications/notifications/src/test/kotlin/org/opensearch/integtest/PluginRestTestCase.kt @@ -58,7 +58,7 @@ abstract class PluginRestTestCase : OpenSearchRestTestCase() { open fun wipeAllPluginIndices() { val pluginIndices = listOf(".opensearch-notifications-config") val response = client().performRequest(Request("GET", "/_cat/indices?format=json&expand_wildcards=all")) - val xContentType = XContentType.fromMediaTypeOrFormat(response.entity.contentType.value) + val xContentType = XContentType.fromMediaType(response.entity.contentType.value) xContentType.xContent().createParser( NamedXContentRegistry.EMPTY, DeprecationHandler.THROW_UNSUPPORTED_OPERATION, response.entity.content