Skip to content

Commit

Permalink
Remove version dependency in cypress workflow (opensearch-project#554)
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Jul 13, 2023
1 parent f1b5218 commit 928507d
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions .github/workflows/remote-integ-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.x'
OPENSEARCH_VERSION: '2.9.0-SNAPSHOT'
OPENSEARCH_DASHBOARDS_FTREPO_VERSION: '2.x'
ANOMALY_DETECTION_PLUGIN_VERSION: '2.x'
jobs:
Expand All @@ -38,20 +37,6 @@ jobs:
if: ${{ matrix.os == 'windows-latest' }}
run: git config --system core.longpaths true

- name: Checkout Anomaly-Detection
uses: actions/checkout@v2
with:
path: anomaly-detection
repository: opensearch-project/anomaly-detection
ref: ${{ env.ANOMALY_DETECTION_PLUGIN_VERSION }}

- name: Run OpenSearch with plugin
run: |
cd anomaly-detection
./gradlew run -Dopensearch.version=${{ env.OPENSEARCH_VERSION }} &
timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done'
shell: bash

- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -81,6 +66,28 @@ jobs:
- run: node -v
- run: yarn -v

- name: Get OpenSearch version
# Need to use bash to avoid having a windows/linux specific step
shell: bash
run: |
cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin
OPENSEARCH_VERSION=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion")-SNAPSHOT
echo "Using OpenSearch version $OPENSEARCH_VERSION"
- name: Checkout Anomaly-Detection
uses: actions/checkout@v2
with:
path: anomaly-detection
repository: opensearch-project/anomaly-detection
ref: ${{ env.ANOMALY_DETECTION_PLUGIN_VERSION }}

- name: Run OpenSearch with plugin
run: |
cd anomaly-detection
./gradlew run -Dopensearch.version=$OPENSEARCH_VERSION &
timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done'
shell: bash

- name: Bootstrap the plugin
run: |
cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin
Expand Down

0 comments on commit 928507d

Please sign in to comment.