diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index f1cd031e..40a64ba2 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -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: @@ -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: @@ -81,6 +66,31 @@ 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 + 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 run: | cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin