From 75c3da1cf275ba465c9990264663c30241c460e6 Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Tue, 4 Oct 2022 23:00:37 -0700 Subject: [PATCH] Fix CI workflows. * Fix java installation for SQL plugin workflow; * Backport workbench CI fixes from #588 and #704. Signed-off-by: Yury-Fridlyand --- .../workflows/sql-test-and-build-workflow.yml | 3 +-- .../sql-workbench-test-and-build-workflow.yml | 17 +++++++++-------- workbench/package.json | 4 ---- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/sql-test-and-build-workflow.yml b/.github/workflows/sql-test-and-build-workflow.yml index 6945c75900..aa7fc3c8be 100644 --- a/.github/workflows/sql-test-and-build-workflow.yml +++ b/.github/workflows/sql-test-and-build-workflow.yml @@ -34,9 +34,8 @@ jobs: - uses: actions/checkout@v3 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v1 with: - distribution: 'temurin' java-version: ${{ matrix.java }} - name: Build with Gradle diff --git a/.github/workflows/sql-workbench-test-and-build-workflow.yml b/.github/workflows/sql-workbench-test-and-build-workflow.yml index 995c7aaf6e..9d7662dd30 100644 --- a/.github/workflows/sql-workbench-test-and-build-workflow.yml +++ b/.github/workflows/sql-workbench-test-and-build-workflow.yml @@ -26,27 +26,28 @@ jobs: with: repository: opensearch-project/Opensearch-Dashboards ref: ${{ env.OPENSEARCH_VERSION }} - path: sql/OpenSearch-Dashboards + path: OpenSearch-Dashboards - name: Setup Node uses: actions/setup-node@v3 with: - node-version: '10.24.1' + node-version-file: "../OpenSearch-Dashboards/.nvmrc" + registry-url: 'https://registry.npmjs.org' - name: Move Workbench to Plugins Dir run: | - mv workbench OpenSearch-Dashboards/plugins + mv workbench ../OpenSearch-Dashboards/plugins - name: OpenSearch Dashboards Plugin Bootstrap uses: nick-fields/retry@v2 with: timeout_minutes: 60 max_attempts: 3 - command: cd OpenSearch-Dashboards/plugins/workbench; yarn osd bootstrap + command: cd ../OpenSearch-Dashboards/plugins/workbench; yarn osd bootstrap - name: Test run: | - cd OpenSearch-Dashboards/plugins/workbench + cd ../OpenSearch-Dashboards/plugins/workbench yarn test:jest --coverage - name: Upload coverage @@ -54,12 +55,12 @@ jobs: uses: codecov/codecov-action@v3 with: flags: query-workbench - directory: ./OpenSearch-Dashboards/plugins/workbench + directory: ./../OpenSearch-Dashboards/plugins/workbench token: ${{ secrets.CODECOV_TOKEN }} - name: Build Artifact run: | - cd OpenSearch-Dashboards/plugins/workbench + cd ../OpenSearch-Dashboards/plugins/workbench yarn build mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip @@ -68,4 +69,4 @@ jobs: uses: actions/upload-artifact@v1 # can't update to v3 because upload fails with: name: workbench - path: OpenSearch-Dashboards/plugins/workbench/build + path: ../OpenSearch-Dashboards/plugins/workbench/build diff --git a/workbench/package.json b/workbench/package.json index 4082fa9061..8bf4b6ff98 100644 --- a/workbench/package.json +++ b/workbench/package.json @@ -42,10 +42,6 @@ "tslint-config-prettier": "^1.18.0", "tslint-plugin-prettier": "^2.0.1" }, - "engines": { - "node": "10.24.1", - "yarn": "^1.21.1" - }, "resolutions": { "**/@types/node": "10.12.27", "@types/react": "16.3.14",