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@v1
40
+ with :
41
+ plugin_name : anomaly-detection-dashboards-plugin
42
+ built_plugin_name : anomalyDetectionDashboards
43
+ install_zip : true
44
+
45
+ - name : Start the binary
46
+ run : |
47
+ nohup ./bin/opensearch-dashboards &
48
+ working-directory : ${{ steps.setup-dashboards.outputs.dashboards-binary-directory }}
49
+ shell : bash
50
+
51
+ - name : Health check
52
+ run : |
53
+ timeout 300 bash -c 'while [[ "$(curl http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
54
+ shell : bash
0 commit comments