mirror of
https://github.com/kiwix/kiwix-build.git
synced 2025-06-26 10:11:27 +00:00
Use python to update failure logs.
This commit is contained in:
18
.github/scripts/upload_failure_logs.py
vendored
Executable file
18
.github/scripts/upload_failure_logs.py
vendored
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import tarfile
|
||||
from pathlib import Path
|
||||
from common import upload, OS_NAME, PLATFORM_TARGET, HOME
|
||||
|
||||
ARCHIVE_NAME = Path(f"fail_log_{OS_NAME}_{PLATFORM_TARGET}.tar.gz")
|
||||
|
||||
|
||||
files_to_archive = []
|
||||
files_to_archive += HOME.glob("BUILD_*")
|
||||
files_to_archive += [HOME/"SOURCE", HOME/"LOGS", HOME/"TOOLCHAINS"]
|
||||
|
||||
with tarfile.open(ARCHIVE_NAME, "w:xz") as tar:
|
||||
for name in set(files_to_archive):
|
||||
tar.add(str(name))
|
||||
|
||||
upload(ARCHIVE_NAME, "ci@tmp.kiwix.org:30022", "/data/tmp/ci")
|
16
.github/scripts/upload_failure_logs.sh
vendored
16
.github/scripts/upload_failure_logs.sh
vendored
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
cd $HOME
|
||||
|
||||
ARCHIVE_NAME=fail_log_${OS_NAME}_${COMPILE_CONFIG}.tar.gz
|
||||
tar -czf ${ARCHIVE_NAME} $HOME/BUILD_* $HOME/SOURCE $HOME/LOGS $HOME/TOOLCHAINS
|
||||
|
||||
echo "Uploading archive $ARCHIVE_NAME"
|
||||
|
||||
scp -c aes128-ctr -P 30022 -p -i ${SSH_KEY} \
|
||||
-o PasswordAuthentication=no \
|
||||
-o StrictHostKeyChecking=no \
|
||||
$ARCHIVE_NAME \
|
||||
ci@tmp.kiwix.org:/data/tmp/ci
|
Reference in New Issue
Block a user