]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
output build log in case of build failures
authorHolger Levsen <holger@layer-acht.org>
Thu, 1 Sep 2011 14:56:58 +0000 (16:56 +0200)
committerHolger Levsen <holger@layer-acht.org>
Thu, 1 Sep 2011 14:56:58 +0000 (16:56 +0200)
build.py

index 9ee5e734cb6c01357995a8b20e193e22ad77d731..88a883457d07730d3606fc9c7434bf15f4c6185c 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -401,8 +401,11 @@ if __name__ == '__main__':
             'This is the output of git-buildpackage: \n%s'
             %(ret)
     )
-    logger.debug(os.listdir('./'))
-    logger.debug(os.listdir('../'))
+    if not ret:
+        build_log=os.path.join('../build-area/result/', '%s_%s_amd64.build' % (pkg_name, version))
+        logger.info(read_file(build_log))
+    #logger.debug(os.listdir('./'))
+    #logger.debug(os.listdir('../'))
     create_dput_cfg()
     changes_file =  '%s_%s_amd64.changes' % (pkg_name, version)
     dput_package_upload(os.path.join(GIT_TARGET_WORKSPACE, 'build-area/result/', changes_file))