Skip to content

Commit 7264cf7

Browse files
authored
Add workflow to verify binary installation (#347)
* Add workflow to verify binary installation Signed-off-by: Derek Ho <dxho@amazon.com> * Fix name Signed-off-by: Derek Ho <dxho@amazon.com> --------- Signed-off-by: Derek Ho <dxho@amazon.com>
1 parent 3b4d3a2 commit 7264cf7

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: 'Install Dashboards with Plugin via Binary'
2+
3+
on: [push, pull_request]
4+
env:
5+
OPENSEARCH_VERSION: '3.0.0'
6+
CI: 1
7+
# avoid warnings like "tput: No value for $TERM and no -T specified"
8+
TERM: xterm
9+
10+
jobs:
11+
verify-binary-installation:
12+
name: Run binary installation
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest]
17+
# TODO: add windows support when OSD core is stable on windows
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- name: Checkout Branch
21+
uses: actions/checkout@v3
22+
23+
- name: Set env
24+
run: |
25+
opensearch_version=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion")
26+
plugin_version=$(node -p "require('./opensearch_dashboards.json').version")
27+
echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV
28+
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV
29+
shell: bash
30+
31+
- name: Run Opensearch
32+
uses: derek-ho/start-opensearch@v2
33+
with:
34+
opensearch-version: ${{ env.OPENSEARCH_VERSION }}
35+
security-enabled: false
36+
37+
- name: Run Dashboard
38+
id: setup-dashboards
39+
uses: derek-ho/setup-opensearch-dashboards@v2
40+
with:
41+
plugin_name: dashboards-visualizations
42+
built_plugin_name: ganttChartDashboards
43+
built_plugin_suffix: ${{ env.OPENSEARCH_VERSION }}
44+
install_zip: true
45+
46+
- name: Start the binary
47+
run: |
48+
nohup ./bin/opensearch-dashboards &
49+
working-directory: ${{ steps.setup-dashboards.outputs.dashboards-binary-directory }}
50+
shell: bash
51+
52+
- name: Health check
53+
run: |
54+
timeout 300 bash -c 'while [[ "$(curl http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
55+
shell: bash
56+

0 commit comments

Comments
 (0)