From 079272ac55aaaa8afe453d82fe19a483a81e4fc3 Mon Sep 17 00:00:00 2001 From: fuzzard Date: Mon, 9 Dec 2024 13:09:42 +1000 Subject: [PATCH] binary-addons build dont capture sh result The actual size of the output from the capture of the stdout is pruned and not output to the jenkins log, therefore we do not actually see the entire build log of addons. The .last_failed_revision seems to not be used as far as i can find, and because of the pruned output in the result var, wont ever currently tag a failure --- vars/buildKodi.groovy | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/vars/buildKodi.groovy b/vars/buildKodi.groovy index 5734b27..9dd2ca1 100644 --- a/vars/buildKodi.groovy +++ b/vars/buildKodi.groovy @@ -266,20 +266,11 @@ def call(Map buildParams = [:]) { steps { script { env.FAILED_BUILD_FILENAME = '.last_failed_revision' - result = sh returnStdout: true, script: ''' - echo "building binary addons: $ADDONS" - rm -f $WORKSPACE/cmake/.last_failed_revision - cd $WORKSPACE/tools/depends/target/binary-addons - make -j$BUILDTHREADS ADDONS="$ADDONS" V=1 VERBOSE=1 - ''' - - hashStr = rev.trim() + verifyHash - if (result =~ /Following Addons failed to build/ ) { - writeFile file: "${WORKSPACE}/cmake/.last_failed_revision", text: "${hashStr}" - } - else { - writeFile file: "${WORKSPACE}/cmake/.last_success_revision", text: "${hashStr}" - } + sh 'bash -c "\ + echo \\"building binary addons: $ADDONS\\" \ + && cd $WORKSPACE/tools/depends/target/binary-addons \ + && make -j$BUILDTHREADS ADDONS=\\"$ADDONS\\" V=1 VERBOSE=1 \ + "' } } }