Skip to content

Commit

Permalink
Zip MIM logs before uploading to S3
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Aug 27, 2024
1 parent a82aa72 commit c85df48
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/circleci-prepare-log-dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,19 @@ EOL

now=`date +'%Y-%m-%d_%H.%M.%S'`
LOG_DIR_ROOT=${CT_REPORTS}/logs/${now}
LOG_ZIP=${CT_REPORTS}/logs_${now}.zip
for dev_node_logs_path in `find _build -name log -type d`; do
dev_node=$(basename $(dirname $(dirname $(dirname ${dev_node_logs_path}))))
LOG_DIR=${LOG_DIR_ROOT}/${dev_node}/log
LOG_DIR=${LOG_DIR_ROOT}/${dev_node}/
mkdir -p ${LOG_DIR}
cp ${dev_node_logs_path}/* ${LOG_DIR}
done

cp *.log ${LOG_DIR_ROOT}
cp big_tests/*.log ${LOG_DIR_ROOT} || true

# Zip to safe space
zip -9 -r "$LOG_ZIP" "$LOG_DIR_ROOT"

# Slightly faster than removing
mv "$LOG_DIR_ROOT" /tmp/

0 comments on commit c85df48

Please sign in to comment.