8
8
OPENSEARCH_VERSION : ' main'
9
9
OPENSEARCH_PLUGIN_VERSION : 2.4.0.0
10
10
11
+
11
12
jobs :
12
- build :
13
+ linux- build :
13
14
runs-on : ubuntu-latest
14
15
steps :
15
16
- name : Checkout Plugin
73
74
yarn build
74
75
75
76
cd build
76
- mkdir -p ./{linux-x64,linux-arm64,windows-x64 }/opensearch-dashboards/${{ env.PLUGIN_NAME }}
77
+ mkdir -p ./{linux-x64,linux-arm64}/opensearch-dashboards/${{ env.PLUGIN_NAME }}
77
78
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-x64/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip
78
79
cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-arm64/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip
79
- mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows-x64/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64.zip
80
80
81
81
cd linux-x64
82
82
wget https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
92
92
mv ./${{ env.ARTIFACT_NAME }}-*.zip ..
93
93
cd ..
94
94
95
- cd windows-x64
96
- wget https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-windows-x64.zip
97
- unzip chromium-windows-x64.zip -d ./opensearch-dashboards/${{ env.PLUGIN_NAME }}
98
- zip -ur ./${{ env.ARTIFACT_NAME }}-*.zip ./opensearch-dashboards
99
- mv ./${{ env.ARTIFACT_NAME }}-*.zip ..
100
- cd ..
101
-
102
95
- name : Upload Artifact For Linux x64
103
96
uses : actions/upload-artifact@v1
104
97
with :
@@ -111,8 +104,153 @@ jobs:
111
104
name : dashboards-reports-linux-arm64
112
105
path : ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip
113
106
107
+ windows-build :
108
+ runs-on : windows-latest
109
+ steps :
110
+ - name : Checkout Plugin
111
+ uses : actions/checkout@v1
112
+
113
+ # Enable longer filenames for windows
114
+ - name : Enable longer filenames
115
+ run : git config --system core.longpaths true
116
+
117
+ - name : Checkout OpenSearch Dashboards
118
+ uses : actions/checkout@v1
119
+ with :
120
+ repository : opensearch-project/Opensearch-Dashboards
121
+ ref : ${{ env.OPENSEARCH_VERSION }}
122
+ path : dashboards-reports/OpenSearch-Dashboards
123
+
124
+ - name : Get node version
125
+ id : versions_step
126
+ run :
127
+ echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
128
+
129
+ - name : Setup Node
130
+ uses : actions/setup-node@v1
131
+ with :
132
+ node-version : ${{ steps.versions_step.outputs.node_version }}
133
+ registry-url : ' https://registry.npmjs.org'
134
+
135
+
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
147
+
148
+ - name : OpenSearch Dashboards Plugin Bootstrap
149
+ uses : nick-invision/retry@v1
150
+ with :
151
+ timeout_minutes : 30
152
+ max_attempts : 3
153
+ command : cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} && yarn osd bootstrap
154
+
155
+ - name : Test
156
+ uses : nick-invision/retry@v1
157
+ with :
158
+ timeout_minutes : 30
159
+ max_attempts : 3
160
+ command : cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} && yarn test
161
+
162
+ - name : Build Artifact
163
+ run : |
164
+ cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
165
+ 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 ..
180
+
114
181
- name : Upload Artifact For Windows
115
182
uses : actions/upload-artifact@v1
116
183
with :
117
184
name : dashboards-reports-windows-x64
118
- path : ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64.zip
185
+ path : OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64.zip
186
+
187
+ macos-build :
188
+ runs-on : macos-latest
189
+ steps :
190
+ - name : Checkout Plugin
191
+ uses : actions/checkout@v1
192
+
193
+ - name : Checkout OpenSearch Dashboards
194
+ uses : actions/checkout@v1
195
+ with :
196
+ repository : opensearch-project/Opensearch-Dashboards
197
+ ref : ${{ env.OPENSEARCH_VERSION }}
198
+ path : dashboards-reports/OpenSearch-Dashboards
199
+
200
+ - name : Get node version
201
+ id : versions_step
202
+ run :
203
+ echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
204
+
205
+ - name : Setup Node
206
+ uses : actions/setup-node@v1
207
+ with :
208
+ node-version : ${{ steps.versions_step.outputs.node_version }}
209
+ registry-url : ' https://registry.npmjs.org'
210
+
211
+
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
221
+
222
+ - name : OpenSearch Dashboards Plugin Bootstrap
223
+ uses : nick-invision/retry@v1
224
+ with :
225
+ timeout_minutes : 30
226
+ max_attempts : 3
227
+ command : cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn osd bootstrap
228
+
229
+ - name : Test
230
+ uses : nick-invision/retry@v1
231
+ with :
232
+ timeout_minutes : 30
233
+ max_attempts : 3
234
+ command : cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test
235
+
236
+ - name : Build Artifact
237
+ run : |
238
+ cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
239
+ yarn build
240
+
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
253
+ uses : actions/upload-artifact@v1
254
+ 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
0 commit comments