From: Holger Levsen Date: Wed, 11 Apr 2012 16:29:19 +0000 (+0200) Subject: make test results available in jenkins X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=d191d6bfc1fd82d94440de285e007652f4ad99a0;p=profitbricks%2Fjenkins-build-scripts.git make test results available in jenkins --- diff --git a/debian_build.py b/debian_build.py index f9c0e31..bcca4e2 100755 --- a/debian_build.py +++ b/debian_build.py @@ -442,8 +442,17 @@ if __name__ == '__main__': else: logger.debug('git-buildpackage executed successfully') - # FIXME: if reports.tgz exists untar it to workspace and delete it. - # tar xzvf ../build-area/result/reports.tgz 2>/dev/null|| true + # make test results available in jenkins: + # + # if reports.tgz exists untar it to workspace and delete it. + # reports.tgz is generated by /root/.pbuilder/hooks.d/B01-test + cmd = ['/bin/tar', 'xzvf', os.path.join(CWD, '../build-area/result/reports.tgz'), '-C', CWD] + try: + subprocess.check_call(cmd) + cmd = ['/bin/rm', os.path.join(CWD, '../build-area/result/reports.tgz')] + subprocess.check_call(cmd) + except: + pass # build was succesful, now let's tag it if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/'):