Skip to content

Commit 9ce8684

Browse files
authored
Fix windows and macos CI (#569)
* Update windows & mac CI for reo name change Signed-off-by: Rupal Mahajan <[email protected]> * Fix linux build Signed-off-by: Rupal Mahajan <[email protected]> Signed-off-by: Rupal Mahajan <[email protected]>
1 parent f250deb commit 9ce8684

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

.github/workflows/dashboards-reports-test-and-build-workflow.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
with:
2222
repository: opensearch-project/Opensearch-Dashboards
2323
ref: ${{ env.OPENSEARCH_VERSION }}
24-
path: dashboards-reports/OpenSearch-Dashboards
24+
path: OpenSearch-Dashboards
2525

2626
- name: Get node version
2727
id: versions_step
2828
run:
29-
echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
29+
echo "::set-output name=node_version::$(node -p "(require('../OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
3030

3131
- name: Setup Node
3232
uses: actions/setup-node@v1
@@ -36,13 +36,13 @@ jobs:
3636

3737

3838
- name: Move Dashboards Reports to Plugins Dir
39-
run: mv dashboards-reports OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
39+
run: mv dashboards-reports ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
4040

4141
- name: Add Chromium Binary to Reporting for Testing
4242
run: |
4343
sudo apt update
4444
sudo apt install -y libnss3-dev fonts-liberation libfontconfig1
45-
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
45+
cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
4646
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip
4747
unzip chromium-linux-x64.zip
4848
rm chromium-linux-x64.zip
@@ -52,25 +52,25 @@ jobs:
5252
with:
5353
timeout_minutes: 30
5454
max_attempts: 3
55-
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn osd bootstrap
55+
command: cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn osd bootstrap
5656

5757
- name: Test
5858
uses: nick-invision/retry@v1
5959
with:
6060
timeout_minutes: 30
6161
max_attempts: 3
62-
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test --coverage
62+
command: cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test --coverage
6363

6464
- name: Upload coverage
6565
uses: codecov/codecov-action@v1
6666
with:
6767
flags: dashboards-reports
68-
directory: OpenSearch-Dashboards/plugins/
68+
directory: ../OpenSearch-Dashboards/plugins/
6969
token: ${{ secrets.CODECOV_TOKEN }}
7070

7171
- name: Build Artifact
7272
run: |
73-
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
73+
cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
7474
yarn build
7575
7676
cd build
@@ -96,13 +96,13 @@ jobs:
9696
uses: actions/upload-artifact@v1
9797
with:
9898
name: dashboards-reports-linux-x64
99-
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip
99+
path: ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip
100100

101101
- name: Upload Artifact For Linux arm64
102102
uses: actions/upload-artifact@v1
103103
with:
104104
name: dashboards-reports-linux-arm64
105-
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip
105+
path: ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip
106106

107107
windows-build:
108108
runs-on: windows-latest
@@ -119,12 +119,12 @@ jobs:
119119
with:
120120
repository: opensearch-project/Opensearch-Dashboards
121121
ref: ${{ env.OPENSEARCH_VERSION }}
122-
path: dashboards-reports/OpenSearch-Dashboards
122+
path: OpenSearch-Dashboards
123123

124124
- name: Get node version
125125
id: versions_step
126126
run:
127-
echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
127+
echo "::set-output name=node_version::$(node -p "(require('../OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
128128

129129
- name: Setup Node
130130
uses: actions/setup-node@v1
@@ -134,11 +134,11 @@ jobs:
134134

135135

136136
- name: Move Dashboards Reports to Plugins Dir
137-
run: mv dashboards-reports OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
137+
run: mv dashboards-reports ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
138138

139139
- name: Add Chromium Binary to Reporting for Testing
140140
run: |
141-
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
141+
cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
142142
curl.exe -LO https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-windows-x64.zip
143143
Expand-Archive -Path 'chromium-windows-x64.zip'
144144
Move-Item -Path "./chromium-windows-x64/.chromium" -Destination "./.chromium"
@@ -150,18 +150,18 @@ jobs:
150150
with:
151151
timeout_minutes: 30
152152
max_attempts: 3
153-
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} && yarn osd bootstrap
153+
command: cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} && yarn osd bootstrap
154154

155155
- name: Test
156156
uses: nick-invision/retry@v1
157157
with:
158158
timeout_minutes: 30
159159
max_attempts: 3
160-
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} && yarn test
160+
command: cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} && yarn test
161161

162162
- name: Build Artifact
163163
run: |
164-
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
164+
cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
165165
yarn build
166166
167167
cd build
@@ -182,7 +182,7 @@ jobs:
182182
uses: actions/upload-artifact@v1
183183
with:
184184
name: dashboards-reports-windows-x64
185-
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
186186

187187
macos-build:
188188
runs-on: macos-latest
@@ -195,12 +195,12 @@ jobs:
195195
with:
196196
repository: opensearch-project/Opensearch-Dashboards
197197
ref: ${{ env.OPENSEARCH_VERSION }}
198-
path: dashboards-reports/OpenSearch-Dashboards
198+
path: OpenSearch-Dashboards
199199

200200
- name: Get node version
201201
id: versions_step
202202
run:
203-
echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
203+
echo "::set-output name=node_version::$(node -p "(require('../OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
204204

205205
- name: Setup Node
206206
uses: actions/setup-node@v1
@@ -210,11 +210,11 @@ jobs:
210210

211211

212212
- name: Move Dashboards Reports to Plugins Dir
213-
run: mv dashboards-reports OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
213+
run: mv dashboards-reports ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
214214

215215
- name: Add Chromium Binary to Reporting for Testing
216216
run: |
217-
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
217+
cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
218218
wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-macos-x64.zip
219219
unzip chromium-macos-x64.zip
220220
rm chromium-macos-x64.zip
@@ -224,18 +224,18 @@ jobs:
224224
with:
225225
timeout_minutes: 30
226226
max_attempts: 3
227-
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn osd bootstrap
227+
command: cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn osd bootstrap
228228

229229
- name: Test
230230
uses: nick-invision/retry@v1
231231
with:
232232
timeout_minutes: 30
233233
max_attempts: 3
234-
command: cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test
234+
command: cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}; yarn test
235235

236236
- name: Build Artifact
237237
run: |
238-
cd OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
238+
cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
239239
yarn build
240240
241241
cd build
@@ -253,4 +253,4 @@ jobs:
253253
uses: actions/upload-artifact@v1
254254
with:
255255
name: dashboards-reports-macosx-x64
256-
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-macos-x64.zip
256+
path: ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-macos-x64.zip

0 commit comments

Comments
 (0)