]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
add error handling
authorRobin Wittler <robin.wittler@profitbricks.com>
Wed, 7 Sep 2011 09:37:46 +0000 (11:37 +0200)
committerRobin Wittler <robin.wittler@profitbricks.com>
Wed, 7 Sep 2011 09:37:46 +0000 (11:37 +0200)
build.py

index f9ba9b8ad4b9fae3ac2f9e72b156f7a5b1840d84..a6647500da8acab23c19fbdf55342511c8dbb95c 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -417,10 +417,13 @@ if __name__ == '__main__':
 
     logger.info('starting git-buildpackage')
     ret = gbp.build()
-    logger.debug(
-            'This is the returncode of git-buildpackage: \n%s'
-            %(ret)
-    )
+    if ret:
+        logger.error(
+                'git-buildpackage returned non-zero. exitcode was: %s', ret
+        )
+        exit_error()
+    else:
+        logger.debug('git-buildpackage executed successfully')
     if not ret:
         build_log=os.path.join('../build-area/result/', '%s_%s_amd64.build' % (pkg_name, version))
         try: