logger.info('Force building with tests as we also merge your branch.')
ENV['BUILD_TRIGGERS'].remove('no-test')
- src_branch = local_branch # save the original branch
- dst_branch = 'integration' # define the new branch
- local_branch = dst_branch # reset env for git-buildpackage
- # FIXME: error handling when rebase doesn't cleanly complete?
- gitrepo.git.rebase('origin/' + dst_branch)
- gitrepo.git.checkout(dst_branch)
- gitrepo.git.pull()
- gitrepo.git.merge(src_branch)
- logger.info('Rebase and merge from branch "{src_branch} completed. Now in "{dst_branch}".'.format(
- dst_branch=dst_branch,
- src_branch=src_branch,
- ))
+ try:
+ src_branch = local_branch # save the original branch
+ dst_branch = 'integration' # define the new branch
+ local_branch = dst_branch # reset env for git-buildpackage
+ gitrepo.git.rebase('origin/' + dst_branch)
+ gitrepo.git.checkout(dst_branch)
+ gitrepo.git.pull()
+ gitrepo.git.merge(src_branch)
+ logger.info('Rebase and merge from branch "{src_branch} completed. Now in "{dst_branch}".'.format(
+ dst_branch=dst_branch,
+ src_branch=src_branch,
+ ))
+ except Exception as error:
+ logger.error('Rebase has failed!', exc_info=error)
if 'no-test' in ENV['BUILD_TRIGGERS']:
# debian/rules from vdc-bundles determines maven options for tests