Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Fetch OpenSearch version in same step #556

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/remote-integ-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ 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:
Expand All @@ -84,8 +76,11 @@ jobs:
- 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'
CONFIG_PATH=../OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin/opensearch_dashboards.json
OPENSEARCH_VERSION=$(node -p "require('$CONFIG_PATH').opensearchDashboardsVersion")-SNAPSHOT
echo "Using OpenSearch version $OPENSEARCH_VERSION"
./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
Expand Down