From 3863e46d75174e1d61652c197d5f8fa9fab31f34 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Tue, 18 Jul 2023 12:35:24 -0700 Subject: [PATCH] Fetch version in step (#556) Signed-off-by: Tyler Ohlsen --- .github/workflows/remote-integ-tests-workflow.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index 326fb32c..3c8bd972 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -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: @@ -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