Skip to content

Commit

Permalink
[Backport 2.x] Fix: CI flow on windows main (#145) (#147)
Browse files Browse the repository at this point in the history
* Fix: CI flow on windows main (#145)

* feat: remove useless step

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add opensearch logs

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add more requestTimeout

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: Hailong Cui <ihailong@amazon.com>
(cherry picked from commit 15c0b72)

* feat: add missing step

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add variable NOTIFICATIONS_PLUGIN_VERSION

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove upload opensearch.log

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe authored Nov 30, 2023
1 parent 905c6ed commit 4e241e1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ jobs:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 11

- name: Checkout Plugin
uses: actions/checkout@v2
with:
path: notifications
repository: opensearch-project/notifications
ref: '2.x'

- name: Check out the notifications repo
uses: actions/checkout@v2
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on: [pull_request, push]
env:
PLUGIN_NAME: notifications-dashboards
OPENSEARCH_DASHBOARDS_VERSION: '2.x'
NOTIFICATIONS_PLUGIN_VERSION: '2.x'

jobs:
tests:
Expand Down Expand Up @@ -49,20 +50,27 @@ jobs:
with:
java-version: 11

- name: Checkout Plugin
uses: actions/checkout@v2
with:
path: notifications
repository: opensearch-project/notifications
ref: '2.x'

# This is a hack, but this step creates a link to the X: mounted drive, which makes the path
# short enough to work on Windows
- name: Shorten Path
if: ${{ matrix.os == 'windows-latest' }}
run: |
git config --system core.longpaths true
subst 'X:' .
- name: enable long paths in git
if: ${{ matrix.os == 'windows-latest' }}
run: |
# enable long paths to fix "path too long" errors when cloning repos in windows
git config --system core.longpaths true
shell: bash

- name: Check out the notifications repo
uses: actions/checkout@v2
with:
repository: opensearch-project/notifications
ref: ${{ env.NOTIFICATIONS_PLUGIN_VERSION }}
path: notifications

- name: Run Opensearch with plugin
working-directory: ${{ env.WORKING_DIR }}
Expand Down Expand Up @@ -136,8 +144,8 @@ jobs:

- name: Run OpenSearch Dashboards server
run: |
cd OpenSearch-Dashboards
yarn start --no-base-path --no-watch --server.host="0.0.0.0" &
cd ./OpenSearch-Dashboards
yarn start --no-base-path --no-watch --server.host="0.0.0.0" --opensearch.requestTimeout=120000 &
timeout 900 bash -c 'while [[ "$(curl -s http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do echo sleeping 5; sleep 5; done'
curl -sk localhost:5601/api/status | jq
netstat -anp tcp | grep LISTEN | grep 5601 || netstat -ntlp | grep 5601
Expand Down

0 comments on commit 4e241e1

Please sign in to comment.