scripts/bw-compat: use docker logs for log collection

Switch collect_logs from docker cp to docker logs to reliably capture
container output. The previous approach used docker cp to copy lnd log
files from inside named volumes, which silently fails in CI — the
directory gets created and the success echo prints, but no files are
ever copied, causing upload-artifact to report "No files were found".

docker logs reads directly from Docker's captured stdout/stderr buffer,
bypassing the volume entirely, and works as long as the container exists.
This commit is contained in:
ziggie 2026-03-05 15:51:59 +01:00
parent 7c38c1ea05
commit 2b4dc4eace
No known key found for this signature in database
GPG key ID: 1AFF9C4DCED6D666

View file

@ -307,9 +307,7 @@ function collect_logs() {
for node in alice bob charlie dave bob-pr dave-pr; do
if docker ps -a --format '{{.Names}}' | grep -q "^${node}$"; then
mkdir -p "$log_dir/$node"
docker cp "$node:/root/.lnd/logs/bitcoin/regtest/lnd.log" \
"$log_dir/$node/lnd.log" 2>/dev/null || true
docker logs "$node" > "$log_dir/${node}.log" 2>&1 || true
fi
done