]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build: ensure instructions are shown no matter if build was successful
authorMathias Klette <mathias.klette@profitbricks.com>
Mon, 17 Jun 2013 10:53:50 +0000 (12:53 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Mon, 17 Jun 2013 10:53:50 +0000 (12:53 +0200)
debian_build.py

index e99f94b9a6adec0426cf1c045d230d9c4a57c338..42a4c366a571460cfb71079c9b52f87722766dce 100755 (executable)
@@ -465,14 +465,7 @@ if __name__ == '__main__':
     logger.info('Reset repository to HEAD~1 to revert develop changelog entry.')
     logger.debug(gitrepo.git.reset('--soft', 'HEAD~1'))
 
-    # .. now handle the result
-    if ret:
-        logger.error('git-buildpackage failed with exitcode {code}'.format(code=ret))
-        figlet('Build failed')
-        exit_error()
-    else:
-        figlet('Build OK')
-
+    # .. show instructions of how to get interactive build
     logger.info('''
 ###
 ###  In case you need to analyze the results within chroot, do the following:
@@ -496,6 +489,15 @@ export {gbp_env} FORCE_SHELL=TRUE
                             ]),
             command=' '.join(gbp.command),
         ))
+
+    # .. and finally handle the result
+    if ret:
+        logger.error('git-buildpackage failed with exitcode {code}'.format(code=ret))
+        figlet('Build failed')
+        exit_error()
+    else:
+        figlet('Build OK')
+
     #
     # ACT V: post-build actions
     #