]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build: try to get some more output when autoincrementing (doesn't work ..)
authorMathias Klette <mathias.klette@profitbricks.com>
Sun, 16 Jun 2013 01:35:05 +0000 (03:35 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Sun, 16 Jun 2013 01:35:05 +0000 (03:35 +0200)
.. for successfully operations. only helps in case of error. and this might
change with the new version avl. in wheezy. haven't tested this yet.

debian_build.py

index ec0f462d9204fb7f64e7beacab34db4c7bb59327..8b76cc010361d2321f53514296897a1ce93f2aec 100755 (executable)
@@ -371,11 +371,16 @@ if __name__ == '__main__':
 
     # .. and update changelog if we trust the package
     if do_autoincrement:
-        subprocess.check_call([BIN_DCH, '-i', 'Released by jenkins.'])
-        subprocess.check_call([BIN_GIT_DCH, '-R', '-a', '--spawn-editor=none'])
-        gitrepo.git.commit('-a', '-s', '-m', 'Released by jenkins')
-        gitrepo.git.push('origin', 'master')
-        logger.info('Changelog autoincremented and pushed back by Jenkins!')
+        logger.info('This is an autoincrementing project.')
+        try:
+            logger.debug(subprocess.check_call([BIN_DCH, '-i', 'Released by enkins.']))
+            logger.debug(subprocess.check_call([BIN_GIT_DCH, '-R', '-a', --spawn-editor=none']))
+            logger.debug(gitrepo.git.commit('-a', '-s', '-m', 'Released by enkins'))
+            logger.debug(gitrepo.git.push('origin', 'master'))
+            logger.info('Changelog autoincremented and pushed back by enkins!')
+        except Exception as error:
+            logger.error('Autoincrement failed. Standard error eturned:\n\n%s\n' % error.stderr, exc_info=error)
+            exit_error()
 
     # .. or set approriate versions for our development candidates
     else: