use gtail for followinf the log file
Some checks failed
Solaris Multi-Build / build (i386, 172.16.11.20, 2.6) (push) Failing after 10m8s
Some checks failed
Solaris Multi-Build / build (i386, 172.16.11.20, 2.6) (push) Failing after 10m8s
This commit is contained in:
parent
0bd104cae5
commit
759641d58c
@ -73,27 +73,27 @@ jobs:
|
||||
fi
|
||||
|
||||
echo "=== Building $pkg on Solaris ${{ matrix.osver }} ${{ matrix.arch }} ==="
|
||||
LOGFILE=$(bash build.sh all 2>&1 | tee /tmp/build-$pkg.log | ggrep -oE '[^ ]+\.log' | tail -n1)
|
||||
LOGFILE=$(bash build.sh all 2>&1 | tee /tmp/build-$pkg.log | ggrep -oE '[^ ]+\.log' | gtail -n1)
|
||||
|
||||
if [ -z "$LOGFILE" ]; then
|
||||
echo "ERROR: Could not detect logfile for $pkg"
|
||||
exit 1
|
||||
if [ -n "$LOGFILE" ] && [ -f "$LOGFILE" ]; then
|
||||
echo "Tailing logfile: $LOGFILE"
|
||||
gtail -f "$LOGFILE" &
|
||||
TAIL_PID=$!
|
||||
else
|
||||
echo "ERROR: No logfile detected for $pkg"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Tailing logfile: $LOGFILE"
|
||||
tail -f "$LOGFILE" &
|
||||
TAIL_PID=$!
|
||||
|
||||
wait -n
|
||||
EXIT_CODE=$?
|
||||
kill $TAIL_PID || true
|
||||
|
||||
if [ $EXIT_CODE -eq 0 ]; then
|
||||
echo "Build succeeded for $pkg, deleting logfile."
|
||||
rm -f "$LOGFILE" || true
|
||||
echo "Build succeeded for $pkg, deleting logfile."
|
||||
rm -f "$LOGFILE" || true
|
||||
else
|
||||
echo "Build FAILED for $pkg, keeping logfile: $LOGFILE"
|
||||
exit $EXIT_CODE
|
||||
echo "Build FAILED for $pkg, keeping logfile: $LOGFILE"
|
||||
exit $EXIT_CODE
|
||||
fi
|
||||
|
||||
echo "=== Finished $pkg ==="
|
||||
|
Loading…
x
Reference in New Issue
Block a user