From de3f4ec2a329a1506f6ce491eb433a68b7084145 Mon Sep 17 00:00:00 2001 From: Manuel Mendez <github@i.m.mmlb.dev> Date: Wed, 27 Mar 2024 15:29:09 -0400 Subject: [PATCH] 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> --- .circleci/config.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 50c8d4e4..88925a3d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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