ci: Replace while loop with tail of multiple files

Gives the exact same output:

```
docker run --rm -ti debian:11 bash -c '
  mkdir -p build/subdir1/ build/subdir2
  echo "subdir1 error" >build/subdir1/fail.log
  echo "subdir2 error" >build/subdir2/fail.log
  find build -type f -name "*.log" -exec tail -n +1 "{}" +
'
==> build/subdir1/fail.log <==
subdir1 error

==> build/subdir2/fail.log <==
subdir2 error
```

Signed-off-by: Manuel Mendez <github@i.m.mmlb.dev>
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
Manuel Mendez 2024-03-27 15:29:09 -04:00 committed by Thierry Laurion
parent 713eadc129
commit de3f4ec2a3
No known key found for this signature in database
GPG Key ID: 9A53E1BB3FF00461

View File

@ -89,13 +89,7 @@ commands:
name: Output build failing logs
command: |
if [[ -f ./tmpDir/failed_build ]]; then
find "./build/<<parameters.arch>>/" -name "*.log" -type f -mmin -1 |
while read log; do
echo ""
echo '==>' "$log" '<=='
echo ""
cat "$log"
done
find "./build/<<parameters.arch>>/" -name "*.log" -type f -mmin -1 -exec tail -n +1 '{}' +
exit 1
else
echo "Step hasn't failed. Continuing with next step..."
@ -571,7 +565,6 @@ workflows:
subcommand: ""
requires:
- nitropad-nv41
# - build:
# name: UNMAINTAINED_kgpe-d16_workstation-usb_keyboard
# target: UNMAINTAINED_kgpe-d16_workstation-usb_keyboard