]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build: show help instructions for chroot debugging on either case (success...
authorMathias Klette <mathias.klette@profitbricks.com>
Fri, 7 Jun 2013 10:00:27 +0000 (12:00 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Fri, 7 Jun 2013 10:00:27 +0000 (12:00 +0200)
debian_build.py

index 21fce2e21679198780bc22bc92b09a1c2f20a88f..ea7b2b96a3ba8c46cf5213696d67ef609edbfe0b 100755 (executable)
@@ -450,12 +450,17 @@ if __name__ == '__main__':
 
     # .. now handle the result
     if ret:
+        logger.error('git-buildpackage failed with exitcode {code}'.format(code=ret))
         figlet('Build failed')
-        logger.error('''git-buildpackage failed with exitcode {code}
+        exit_error()
+    else:
+        figlet('Build OK')
+
+    logger.info('''
 ### 
-###  In case you need to analyze errors within chroot, do the following:
+###  In case you need to analyze the results within chroot, do the following:
 ###    * login to {hostname}
-###    * become {jenkins_user}
+###    * become user {jenkins_user}
 ###    * then execute:
 ### 
 
@@ -466,7 +471,6 @@ export {gbp_env} FORCE_SHELL=TRUE
 ###
 ###
 '''.format(
-            code=ret,
             hostname=socket.gethostname(),
             jenkins_user=ENV['USER'],
             jenkins_workspace=ENV['WORKSPACE'],
@@ -475,10 +479,6 @@ export {gbp_env} FORCE_SHELL=TRUE
                             ]),
             command=' '.join(gbp.command),
         ))
-        exit_error()
-    else:
-        figlet('Build OK')
-
     #
     # ACT V: post-build actions
     #