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