Fix GHA logs dir and make tar and upload conditional on web console test failures (#15810)

The PR makes 2 change:

Correct the current logs directory tarred in GHA static checks to log
Make the steps of logs tar-ing and uploading conditional on web console test failures, which currently happens on any step failure in static checks workflow
Sample logs before this change for failed static checks: https://github.com/apache/druid/actions/runs/7719743853/job/21043502498
This commit is contained in:
Vishesh Garg 2024-01-31 15:39:56 +05:30 committed by GitHub
parent f701197224
commit 2a250a4e6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -178,6 +178,7 @@ jobs:
{ for i in 1 2 3; do npm run codecov && break || sleep 15; done }
- name: web console end-to-end test
id: web-console-test
run: |
./.github/scripts/setup_generate_license.sh
web-console/script/druid build
@ -186,11 +187,11 @@ jobs:
web-console/script/druid stop
- name: Tar druid logs
if: ${{ failure() }}
run: tar cvzf ./druid-logs.tgz -C ./distribution/target/apache-druid-*-SNAPSHOT/ logs
if: ${{ steps.web-console-test.conclusion == 'failure' }}
run: tar cvzf ./druid-logs.tgz -C ./distribution/target/apache-druid-*-SNAPSHOT/ log
- name: Upload druid logs to GitHub
if: ${{ failure() }}
if: ${{ steps.web-console-test.conclusion == 'failure' }}
uses: actions/upload-artifact@master
with:
name: Druid logs web-checks