14
14
fail-fast : false
15
15
matrix :
16
16
os : [ ubuntu-latest ]
17
- jdk : [ 21 ]
17
+ jdk : [ 11 ]
18
18
runs-on : ${{ matrix.os }}
19
19
20
20
steps :
@@ -28,20 +28,20 @@ jobs:
28
28
with :
29
29
path : flow-framework
30
30
repository : opensearch-project/flow-framework
31
- ref : ' ${{ github.base_ref }}'
31
+ ref : ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
32
32
33
33
- name : Run OpenSearch with plugin
34
34
run : |
35
35
cd flow-framework
36
36
./gradlew run &
37
37
timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done'
38
38
shell : bash
39
-
39
+
40
40
- name : Check OpenSearch Running on Linux
41
41
if : ${{ runner.os != 'Windows'}}
42
42
run : curl http://localhost:9200/
43
43
shell : bash
44
-
44
+
45
45
- name : Checkout OpenSearch Dashboards
46
46
uses : actions/checkout@v2
47
47
with :
@@ -70,44 +70,55 @@ jobs:
70
70
node-version : ${{ steps.tool-versions.outputs.node_version }}
71
71
registry-url : ' https://registry.npmjs.org'
72
72
73
- - name : Setup Opensearch Dashboards
73
+ - name : Install correct yarn version for OpenSearch Dashboards
74
+ id : setup-yarn
74
75
run : |
75
76
npm uninstall -g yarn
76
- echo "Installing yarn ${{ steps.tool-versions.outputs.yarn_version }}"
77
- npm i -g yarn@${{ steps.tool-versions.outputs.yarn_version }}
78
- yarn cache clean
79
- yarn add sha.js
80
- working-directory : OpenSearch-Dashboards
81
- shell : bash
77
+ echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
78
+ npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }}
82
79
83
- - name : Bootstrap Opensearch Dashboards
80
+ - name : Yarn Cache
81
+ uses : actions/cache@v4
82
+ with :
83
+ path : |
84
+ OpenSearch-Dashboards/**/target
85
+ OpenSearch-Dashboards/**/node_modules
86
+ key : ${{ runner.OS }}-build-${{ hashFiles('OpenSearch-Dashboards/**/yarn.lock') }}
87
+ restore-keys : |
88
+ ${{ runner.OS }}-build-
89
+
90
+ - name : Bootstrap OpenSearch Dashboards
84
91
run : |
92
+ cd OpenSearch-Dashboards
85
93
yarn osd bootstrap --single-version=loose
86
- working-directory : OpenSearch-Dashboards/plugins/dashboards-flow-framework
87
94
95
+ - name : Compile OpenSearch Dashboards
96
+ run : |
97
+ cd OpenSearch-Dashboards
98
+ node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers=10 --verbose
99
+
88
100
- name : Run Opensearch Dashboards with FF Installed
89
101
run : |
90
102
nohup yarn start --no-base-path --no-watch --server.host="0.0.0.0" | tee dashboard.log &
91
- sleep 60
92
103
working-directory : OpenSearch-Dashboards
93
104
94
- - name : Check If OpenSearch Dashboards Is Ready
105
+ - name : Check If OpenSearch Dashboards Is Ready
95
106
if : ${{ runner.os == 'Linux' }}
96
107
run : |
97
- if timeout 600 grep -q "bundles compiled successfully after" <(tail -n0 -f dashboard.log); then
98
- echo "OpenSearch Dashboards compiled successfully."
108
+ cd ./OpenSearch-Dashboards
109
+ if timeout 60 grep -q "http server running" <(tail -n +1 -f dashboard.log); then
110
+ echo "OpenSearch Dashboards started successfully."
99
111
else
100
- echo "Timeout for 600 seconds reached. OpenSearch Dashboards did not finish compiling ."
112
+ echo "Timeout of 60 seconds reached. OpenSearch Dashboards did not start successfully ."
101
113
exit 1
102
- fi
103
- working-directory : OpenSearch-Dashboards
114
+ fi&
104
115
105
116
- name : Show OpenSearch Dashboards Logs
106
117
if : always()
107
118
run : cat dashboard.log
108
119
working-directory : OpenSearch-Dashboards
109
-
110
- - name : Health check
120
+
121
+ - name : Health check
111
122
run : |
112
123
timeout 600 bash -c 'while [[ "$(curl -k http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
113
124
shell : bash
@@ -164,5 +175,4 @@ jobs:
164
175
if : failure()
165
176
with :
166
177
name : cypress-videos-${{ matrix.os }}
167
- path : opensearch-dashboards-functional-test/cypress/videos
168
-
178
+ path : opensearch-dashboards-functional-test/cypress/videos
0 commit comments