Skip to content

Commit

Permalink
fix for failing OSD distribution build
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Singh <sngri@amazon.com>
  • Loading branch information
rishabh6788 committed Jan 11, 2023
1 parent 10c1479 commit e3753a4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 178 deletions.
3 changes: 1 addition & 2 deletions manifests/2.5.0/opensearch-dashboards-2.5.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ components:
repository: https://github.com/opensearch-project/dashboards-query-workbench.git
ref: '2.5'
- name: notificationsDashboards
repository: https://github.com/opensearch-project/notifications.git
working_directory: dashboards-notifications
repository: https://github.com/opensearch-project/dashboards-notifications.git
ref: '2.5'
- name: observabilityDashboards
repository: https://github.com/opensearch-project/dashboards-observability.git
Expand Down
87 changes: 0 additions & 87 deletions scripts/components/customImportMapDashboards/build.sh

This file was deleted.

88 changes: 0 additions & 88 deletions scripts/components/notificationsDashboards/build.sh

This file was deleted.

9 changes: 8 additions & 1 deletion scripts/default/opensearch-dashboards/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ if [ "$PLATFORM" = "windows" ]; then
NVM_CMD="volta install node@`cat ../OpenSearch-Dashboards/.nvmrc` && volta install yarn@`jq -r '.engines.yarn' ../OpenSearch-Dashboards/package.json`"
fi

HELPER_CMD=$(jq -r '.scripts.plugin_helpers' package.json)
if [ "$HELPER_CMD" != null ]; then
HELPER_STRING=plugin_helpers
else
HELPER_STRING=plugin-helpers
fi

mkdir -p $OUTPUT/plugins
PLUGIN_NAME=$(basename "$PWD")
# TODO: [CLEANUP] Needed OpenSearch Dashboards git repo to build the required modules for plugins
Expand All @@ -80,7 +87,7 @@ cp -r ../$PLUGIN_NAME/ ../OpenSearch-Dashboards/plugins
echo "BUILD MODULES FOR $PLUGIN_NAME"
(cd ../OpenSearch-Dashboards && eval $NVM_CMD && yarn osd bootstrap)
echo "BUILD RELEASE ZIP FOR $PLUGIN_NAME"
(cd ../OpenSearch-Dashboards && eval $NVM_CMD && cd plugins/$PLUGIN_NAME && yarn plugin-helpers build --opensearch-dashboards-version=$VERSION$QUALIFIER_IDENTIFIER)
(cd ../OpenSearch-Dashboards && eval $NVM_CMD && cd plugins/$PLUGIN_NAME && yarn $HELPER_STRING build --opensearch-dashboards-version=$VERSION$QUALIFIER_IDENTIFIER)
echo "COPY $PLUGIN_NAME.zip"
cp -r ../OpenSearch-Dashboards/plugins/$PLUGIN_NAME/build/$PLUGIN_NAME-$VERSION$QUALIFIER_IDENTIFIER.zip $OUTPUT/plugins/
rm -rf ../OpenSearch-Dashboards/plugins/$PLUGIN_NAME

0 comments on commit e3753a4

Please sign in to comment.