Skip to content

Commit 67fc297

Browse files
Fix AD dashboard installation
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
1 parent cda24bf commit 67fc297

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

.github/workflows/cypress-test-resource-sharing-enabled-e2e.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,36 @@ jobs:
7979
plugin_name: security-dashboards-plugin
8080
opensearch_dashboards_yml: ${{ inputs.dashboards_config_file }}
8181

82-
# Add the Anomaly Detection Dashboards plugin (frontend)
83-
- name: Setup Dashboard with AD Plugin
84-
uses: derek-ho/setup-opensearch-dashboards@v1
85-
with:
86-
plugin_name: anomaly-detection-dashboards-plugin
82+
# Add the Anomaly Detection Dashboards plugin (frontend)
83+
- name: Add Anomaly Detection Dashboards plugin
84+
if: ${{ runner.os == 'Linux' }}
85+
shell: bash
86+
run: |
87+
set -euo pipefail
88+
cd OpenSearch-Dashboards/plugins
89+
90+
# Clone AD Dashboards plugin
91+
git clone --depth=1 https://github.com/opensearch-project/anomaly-detection-dashboards.git
92+
93+
cd anomaly-detection-dashboards
94+
# Try to align to a tag/branch. We try several options and fall back to default.
95+
git fetch --tags --depth=1 || true
96+
for tag in "v${OPENSEARCH_VERSION}" "${OPENSEARCH_VERSION}" "v${PLUGIN_VERSION}" "${PLUGIN_VERSION}"; do
97+
if git rev-parse "$tag" >/dev/null 2>&1; then
98+
echo "Checking out $tag"
99+
git checkout "$tag"
100+
break
101+
fi
102+
done
103+
104+
# Re-bootstrap so OSD installs deps for the newly added plugin
105+
- name: Bootstrap OpenSearch Dashboards (plugins)
106+
if: ${{ runner.os == 'Linux' }}
107+
shell: bash
108+
run: |
109+
set -euo pipefail
110+
cd OpenSearch-Dashboards
111+
yarn osd bootstrap --no-cache
87112
88113
- name: Compile OpenSearch Dashboards
89114
run: |

0 commit comments

Comments
 (0)