Skip to content

Commit

Permalink
Update E2E Test Config (#1025)
Browse files Browse the repository at this point in the history
* fix name change bug and modify test to test behavior

Signed-off-by: Derek Ho <[email protected]>

* change to sonnatype

Signed-off-by: Derek Ho <[email protected]>

* try to figure out where are we

Signed-off-by: Derek Ho <[email protected]>

* try with file name

Signed-off-by: Derek Ho <[email protected]>

* cut sleep time

Signed-off-by: Derek Ho <[email protected]>

* Add a workflow_dispatch event to E2E

Signed-off-by: Simeon Widdis <[email protected]>

* Attempt to edit workflow pulling

Signed-off-by: Simeon Widdis <[email protected]>

* Remove commented bash lines

Signed-off-by: Simeon Widdis <[email protected]>

* Attempt new plugin names

Signed-off-by: Simeon Widdis <[email protected]>

* Use sonatype artifact links

Signed-off-by: Simeon Widdis <[email protected]>

* Fix link

Signed-off-by: Simeon Widdis <[email protected]>

* Rename SQL artifact download

Signed-off-by: Simeon Widdis <[email protected]>

* Hardcode correct node version

Signed-off-by: Simeon Widdis <[email protected]>

* Use other action for file download

Signed-off-by: Simeon Widdis <[email protected]>

* Fix path for install

Signed-off-by: Simeon Widdis <[email protected]>

* Remove redundant sleep

We have multiple minutes of bootstrapping, and OSD itself waits for OS to start.

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
  • Loading branch information
Swiddis and derek-ho authored Sep 20, 2023
1 parent 8f60eae commit d67ec95
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/integration-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Dashboards observability plugin E2E test
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
env:
PLUGIN_NAME: dashboards-observability
OPENSEARCH_DASHBOARDS_VERSION: 'main'
Expand Down Expand Up @@ -36,14 +37,18 @@ jobs:
java-version: '11'

- name: Download observability artifact
uses: peternied/download-file@v2
uses: suisei-cn/actions-download-file@v1.4.0
with:
url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ env.OPENSEARCH_VERSION }}/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-observability-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-observability&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip
target: plugin-artifacts/
filename: observability.zip

- name: Download SQL artifact
uses: peternied/download-file@v2
uses: suisei-cn/actions-download-file@v1.4.0
with:
url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ env.OPENSEARCH_VERSION }}/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-sql-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-sql-plugin&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip
target: plugin-artifacts/
filename: sql.zip

- name: Download OpenSearch
uses: peternied/download-file@v2
Expand All @@ -58,23 +63,18 @@ jobs:

- name: Install observability plugin
run: |
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-observability-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip"
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/observability.zip"
shell: bash

- name: Install linux SQL plugin
- name: Install SQL plugin
run: |
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-sql-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip"
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/plugin-artifacts/sql.zip"
shell: bash

- name: Run OpenSearch
run: /bin/bash -c "./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/bin/opensearch &"
shell: bash

- name: Sleep while OpenSearch starts
uses: peternied/action-sleep@v1
with:
seconds: 30

- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
with:
Expand All @@ -87,11 +87,15 @@ jobs:
with:
path: OpenSearch-Dashboards/plugins/dashboards-observability

# While bootstrap requires node >= 16.14.0, OSD hasn't yet updated their version number in
# package.json, so we need to hardcode it for now. When it's fixed, this line can dynamically
# pull the value:
# $(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")
- name: Get node and yarn versions
working-directory: ${{ env.WORKING_DIR }}
id: versions_step
run: |
echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
echo "::set-output name=node_version::16"
echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
- name: Setup node
Expand All @@ -115,7 +119,7 @@ jobs:
run: |
cd OpenSearch-Dashboards
yarn start --no-base-path --no-watch &
sleep 400
sleep 200
- name: Install Cypress
run: |
Expand Down

0 comments on commit d67ec95

Please sign in to comment.