Skip to content

Commit

Permalink
Fix: CI flow on windows main (#145)
Browse files Browse the repository at this point in the history
* feat: remove useless step

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add opensearch logs

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add more requestTimeout

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: Hailong Cui <[email protected]>
(cherry picked from commit 15c0b72)
  • Loading branch information
SuZhou-Joe committed Nov 29, 2023
1 parent 905c6ed commit 7162f62
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 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 @@ -49,13 +49,6 @@ 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
Expand All @@ -72,7 +65,7 @@ jobs:
brew install coreutils
fi
cd notifications/notifications
./gradlew run -x integTest -x jacocoTestReport &
./gradlew run -x integTest -x jacocoTestReport | tee -a opensearch.log &
timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done'
shell: bash
env:
Expand Down Expand Up @@ -136,8 +129,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 Expand Up @@ -191,6 +184,12 @@ jobs:
name: cypress-screenshots-${{ matrix.os }}
path: OpenSearch-Dashboards/plugins/dashboards-notifications/.cypress/screenshots

- uses: actions/upload-artifact@v1
if: always()
with:
name: opensearch-logs-${{ matrix.os }}
path: notifications/notifications/opensearch.log

# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
if: always()
Expand Down

0 comments on commit 7162f62

Please sign in to comment.