13
13
linux-build :
14
14
runs-on : ubuntu-latest
15
15
steps :
16
- - name : Checkout Plugin
17
- uses : actions/checkout@v1
18
-
19
16
- name : Checkout OpenSearch Dashboards
20
17
uses : actions/checkout@v1
21
18
with :
@@ -25,90 +22,54 @@ jobs:
25
22
26
23
- name : Get node version
27
24
id : versions_step
28
- run :
29
- echo "::set-output name=node_version::$(node -p "(require('../OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
25
+ run : echo "::set-output name=node_version::$(node -p "(require('../OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
30
26
31
27
- name : Setup Node
32
28
uses : actions/setup-node@v1
33
29
with :
34
30
node-version : ${{ steps.versions_step.outputs.node_version }}
35
31
registry-url : ' https://registry.npmjs.org'
36
32
37
-
38
- - name : Move Dashboards Reports to Plugins Dir
39
- run : mv dashboards-reports ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
40
-
41
- - name : Add Chromium Binary to Reporting for Testing
42
- run : |
43
- sudo apt update
44
- sudo apt install -y libnss3-dev fonts-liberation libfontconfig1
45
- cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
46
- wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
47
- unzip chromium-linux-x64.zip
48
- rm chromium-linux-x64.zip
33
+ - name : Checkout Plugin
34
+ uses : actions/checkout@v1
35
+ with :
36
+ path : OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
49
37
50
38
- name : OpenSearch Dashboards Plugin Bootstrap
51
- uses : nick-invision /retry@v1
39
+ uses : nick-fields /retry@v1
52
40
with :
53
41
timeout_minutes : 30
54
42
max_attempts : 3
55
- command : cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn osd bootstrap
43
+ command : yarn osd bootstrap
56
44
57
45
- name : Test
58
- uses : nick-invision /retry@v1
46
+ uses : nick-fields /retry@v1
59
47
with :
60
48
timeout_minutes : 30
61
49
max_attempts : 3
62
- command : cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test --coverage
50
+ command : yarn test --coverage
63
51
64
52
- name : Upload coverage
65
53
uses : codecov/codecov-action@v1
66
54
with :
67
- flags : dashboards-reports
68
- directory : .. /OpenSearch-Dashboards/plugins/
55
+ flags : dashboards-report
56
+ directory : ./OpenSearch-Dashboards/plugins/
69
57
token : ${{ secrets.CODECOV_TOKEN }}
70
58
71
59
- name : Build Artifact
72
60
run : |
73
- cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
74
61
yarn build
62
+ mv ./build/*.zip ./build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
75
63
76
- cd build
77
- mkdir -p ./{linux-x64,linux-arm64}/opensearch-dashboards/${{ env.PLUGIN_NAME }}
78
- cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-x64/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip
79
- cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-arm64/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip
80
-
81
- cd linux-x64
82
- wget https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
83
- unzip chromium-linux-x64.zip -d ./opensearch-dashboards/${{ env.PLUGIN_NAME }}
84
- zip -ur ./${{ env.ARTIFACT_NAME }}-*.zip ./opensearch-dashboards
85
- mv ./${{ env.ARTIFACT_NAME }}-*.zip ..
86
- cd ..
87
-
88
- cd linux-arm64
89
- wget https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-linux-arm64.zip
90
- unzip chromium-linux-arm64.zip -d ./opensearch-dashboards/${{ env.PLUGIN_NAME }}
91
- zip -ur ./${{ env.ARTIFACT_NAME }}-*.zip ./opensearch-dashboards
92
- mv ./${{ env.ARTIFACT_NAME }}-*.zip ..
93
- cd ..
94
-
95
- - name : Upload Artifact For Linux x64
64
+ - name : Upload Artifact For Linux
96
65
uses : actions/upload-artifact@v1
97
66
with :
98
- name : dashboards-reports-linux-x64
99
- path : ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip
100
-
101
- - name : Upload Artifact For Linux arm64
102
- uses : actions/upload-artifact@v1
103
- with :
104
- name : dashboards-reports-linux-arm64
105
- path : ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip
67
+ name : dashboards-reports-linux
68
+ path : ./build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
106
69
107
70
windows-build :
108
71
runs-on : windows-latest
109
72
steps :
110
- - name : Checkout Plugin
111
- uses : actions/checkout@v1
112
73
113
74
# Enable longer filenames for windows
114
75
- name : Enable longer filenames
@@ -133,63 +94,39 @@ jobs:
133
94
registry-url : ' https://registry.npmjs.org'
134
95
135
96
136
- - name : Move Dashboards Reports to Plugins Dir
137
- run : mv dashboards-reports ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
138
-
139
- - name : Add Chromium Binary to Reporting for Testing
140
- run : |
141
- cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
142
- curl.exe -LO https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-windows-x64.zip
143
- Expand-Archive -Path 'chromium-windows-x64.zip'
144
- Move-Item -Path "./chromium-windows-x64/.chromium" -Destination "./.chromium"
145
- rd chromium-windows-x64.zip
146
- rd chromium-windows-x64
97
+ - name : Checkout Plugin
98
+ uses : actions/checkout@v1
99
+ with :
100
+ path : OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
147
101
148
102
- name : OpenSearch Dashboards Plugin Bootstrap
149
- uses : nick-invision /retry@v1
103
+ uses : nick-fields /retry@v1
150
104
with :
151
105
timeout_minutes : 30
152
106
max_attempts : 3
153
- command : cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} && yarn osd bootstrap
107
+ command : yarn osd bootstrap
154
108
155
109
- name : Test
156
- uses : nick-invision /retry@v1
110
+ uses : nick-fields /retry@v1
157
111
with :
158
112
timeout_minutes : 30
159
113
max_attempts : 3
160
- command : cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} && yarn test
114
+ command : yarn test
161
115
162
116
- name : Build Artifact
163
117
run : |
164
- cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
165
118
yarn build
166
-
167
- cd build
168
- mkdir -p ./windows-x64/opensearch-dashboards/${{ env.PLUGIN_NAME }}
169
- mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows-x64/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64.zip
170
-
171
- cd windows-x64
172
- curl.exe -LO https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-windows-x64.zip
173
- Expand-Archive -Path 'chromium-windows-x64.zip'
174
- Move-Item -Path "./chromium-windows-x64/.chromium" -Destination "./opensearch-dashboards/${{ env.PLUGIN_NAME }}"
175
- rd chromium-windows-x64.zip
176
- rd chromium-windows-x64
177
- Compress-Archive -Path "./${{ env.ARTIFACT_NAME }}-*.zip" -Destination "./opensearch-dashboards"
178
- mv ./${{ env.ARTIFACT_NAME }}-*.zip ..
179
- cd ..
119
+ mv ./build/*.zip ./build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
180
120
181
121
- name : Upload Artifact For Windows
182
122
uses : actions/upload-artifact@v1
183
123
with :
184
- name : dashboards-reports-windows-x64
185
- path : ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/ build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64 .zip
124
+ name : dashboards-reports-windows
125
+ path : ./ build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
186
126
187
127
macos-build :
188
128
runs-on : macos-latest
189
129
steps :
190
- - name : Checkout Plugin
191
- uses : actions/checkout@v1
192
-
193
130
- name : Checkout OpenSearch Dashboards
194
131
uses : actions/checkout@v1
195
132
with :
@@ -209,48 +146,32 @@ jobs:
209
146
registry-url : ' https://registry.npmjs.org'
210
147
211
148
212
- - name : Move Dashboards Reports to Plugins Dir
213
- run : mv dashboards-reports ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
214
-
215
- - name : Add Chromium Binary to Reporting for Testing
216
- run : |
217
- cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
218
- wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-macos-x64.zip
219
- unzip chromium-macos-x64.zip
220
- rm chromium-macos-x64.zip
149
+ - name : Checkout Plugin
150
+ uses : actions/checkout@v1
151
+ with :
152
+ path : OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
221
153
222
154
- name : OpenSearch Dashboards Plugin Bootstrap
223
- uses : nick-invision /retry@v1
155
+ uses : nick-fields /retry@v1
224
156
with :
225
157
timeout_minutes : 30
226
158
max_attempts : 3
227
- command : cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn osd bootstrap
159
+ command : yarn osd bootstrap
228
160
229
161
- name : Test
230
- uses : nick-invision /retry@v1
162
+ uses : nick-fields /retry@v1
231
163
with :
232
164
timeout_minutes : 30
233
165
max_attempts : 3
234
- command : cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test
166
+ command : yarn test
235
167
236
168
- name : Build Artifact
237
169
run : |
238
- cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
239
170
yarn build
171
+ mv ./build/*.zip ./build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
240
172
241
- cd build
242
- mkdir -p ./macos-x64/opensearch-dashboards/${{ env.PLUGIN_NAME }}
243
- mv ./${{ env.PLUGIN_NAME }}-*.zip ./macos-x64/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-macos-x64.zip
244
-
245
- cd macos-x64
246
- wget https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-macos-x64.zip
247
- unzip chromium-macos-x64.zip -d ./opensearch-dashboards/${{ env.PLUGIN_NAME }}
248
- zip -ur ./${{ env.ARTIFACT_NAME }}-*.zip ./opensearch-dashboards
249
- mv ./${{ env.ARTIFACT_NAME }}-*.zip ..
250
- cd ..
251
-
252
- - name : Upload Artifact For MacOS x64
173
+ - name : Upload Artifact For MacOS
253
174
uses : actions/upload-artifact@v1
254
175
with :
255
- name : dashboards-reports-macosx-x64
256
- path : ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/ build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-macos-x64 .zip
176
+ name : dashboards-reports-macosx
177
+ path : ./ build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
0 commit comments