(cherry-pick) Upload log files to github with 5 day retention (#22253)
Build Package Workflow / BUILD_PACKAGE (push) Has been cancelled Details
Code scanning - action / CodeQL-Build (push) Has been cancelled Details

Upload log files to github with 5 day retention

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
This commit is contained in:
stonezdj(Daojun Zhang) 2025-08-15 13:58:53 +08:00 committed by GitHub
parent 436918f8f0
commit ef707fa68a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 18 deletions

View File

@ -148,7 +148,12 @@ jobs:
df -h df -h
bash ./tests/showtime.sh ./tests/ci/api_run.sh DB $IP bash ./tests/showtime.sh ./tests/ci/api_run.sh DB $IP
df -h df -h
- name: upload_logs
uses: actions/upload-artifact@v4
with:
name: db-api-harbor-logs.tar.gz
path: /home/runner/work/harbor/harbor/src/github.com/goharbor/harbor/integration_logs.tar.gz
retention-days: 5
APITEST_DB_PROXY_CACHE: APITEST_DB_PROXY_CACHE:
env: env:
APITEST_DB: true APITEST_DB: true
@ -203,7 +208,12 @@ jobs:
df -h df -h
bash ./tests/showtime.sh ./tests/ci/api_run.sh PROXY_CACHE $IP bash ./tests/showtime.sh ./tests/ci/api_run.sh PROXY_CACHE $IP
df -h df -h
- name: upload_logs
uses: actions/upload-artifact@v4
with:
name: proxy-api-harbor-logs.tar.gz
path: /home/runner/work/harbor/harbor/src/github.com/goharbor/harbor/integration_logs.tar.gz
retention-days: 5
APITEST_LDAP: APITEST_LDAP:
env: env:
APITEST_LDAP: true APITEST_LDAP: true
@ -256,7 +266,12 @@ jobs:
cd src/github.com/goharbor/harbor cd src/github.com/goharbor/harbor
bash ./tests/showtime.sh ./tests/ci/api_run.sh LDAP $IP bash ./tests/showtime.sh ./tests/ci/api_run.sh LDAP $IP
df -h df -h
- name: upload_logs
uses: actions/upload-artifact@v4
with:
name: ldap-api-harbor-logs.tar.gz
path: /home/runner/work/harbor/harbor/src/github.com/goharbor/harbor/integration_logs.tar.gz
retention-days: 5
OFFLINE: OFFLINE:
env: env:
OFFLINE: true OFFLINE: true

View File

@ -36,19 +36,9 @@ else
rc=999 rc=999
fi fi
rc=$? rc=$?
## --------------------------------------------- Upload Harbor CI Logs ------------------------------------------- ## --------------------------------------------- Package Harbor CI Logs -------------------------------------------
#timestamp=$(date +%s) outfile="integration_logs.tar.gz"
#GIT_COMMIT=$(git rev-parse --short "$GITHUB_SHA") sudo tar -zcvf $outfile output.xml log.html /var/log/harbor/*
#outfile="integration_logs_$timestamp$GIT_COMMIT.tar.gz" pwd
#sudo tar -zcvf $outfile output.xml log.html /var/log/harbor/* ls -lh $outfile
#if [ -f "$outfile" ]; then
# uploader $outfile $harbor_logs_bucket
# echo "----------------------------------------------"
# echo "Download test logs:"
# echo "https://storage.googleapis.com/harbor-ci-logs/$outfile"
# echo "----------------------------------------------"
#else
# echo "No log output file to upload"
#fi
exit $rc exit $rc