]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
make test results available in jenkins
authorHolger Levsen <holger@layer-acht.org>
Wed, 11 Apr 2012 16:29:19 +0000 (18:29 +0200)
committerHolger Levsen <holger@layer-acht.org>
Wed, 11 Apr 2012 16:29:19 +0000 (18:29 +0200)
debian_build.py

index f9c0e31bf94b4b3c948b870a42406691bee2baa1..bcca4e211450961acbb5e8c78aef1905b68bd046 100755 (executable)
@@ -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/'):