mirror of https://github.com/goharbor/harbor.git
(cherry-pick) Upload log files to github with 5 day retention (#22253)
Upload log files to github with 5 day retention Signed-off-by: stonezdj <stone.zhang@broadcom.com>
This commit is contained in:
parent
436918f8f0
commit
ef707fa68a
|
@ -148,7 +148,12 @@ jobs:
|
|||
df -h
|
||||
bash ./tests/showtime.sh ./tests/ci/api_run.sh DB $IP
|
||||
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:
|
||||
env:
|
||||
APITEST_DB: true
|
||||
|
@ -203,7 +208,12 @@ jobs:
|
|||
df -h
|
||||
bash ./tests/showtime.sh ./tests/ci/api_run.sh PROXY_CACHE $IP
|
||||
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:
|
||||
env:
|
||||
APITEST_LDAP: true
|
||||
|
@ -256,7 +266,12 @@ jobs:
|
|||
cd src/github.com/goharbor/harbor
|
||||
bash ./tests/showtime.sh ./tests/ci/api_run.sh LDAP $IP
|
||||
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:
|
||||
env:
|
||||
OFFLINE: true
|
||||
|
|
|
@ -36,19 +36,9 @@ else
|
|||
rc=999
|
||||
fi
|
||||
rc=$?
|
||||
## --------------------------------------------- Upload Harbor CI Logs -------------------------------------------
|
||||
#timestamp=$(date +%s)
|
||||
#GIT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")
|
||||
#outfile="integration_logs_$timestamp$GIT_COMMIT.tar.gz"
|
||||
#sudo tar -zcvf $outfile output.xml log.html /var/log/harbor/*
|
||||
#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
|
||||
|
||||
## --------------------------------------------- Package Harbor CI Logs -------------------------------------------
|
||||
outfile="integration_logs.tar.gz"
|
||||
sudo tar -zcvf $outfile output.xml log.html /var/log/harbor/*
|
||||
pwd
|
||||
ls -lh $outfile
|
||||
exit $rc
|
||||
|
|
Loading…
Reference in New Issue