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
|
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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue