]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build: new fixes for new branching model, fix rebasing
authorMathias Klette <mathias.klette@profitbricks.com>
Thu, 30 May 2013 12:33:49 +0000 (14:33 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Thu, 30 May 2013 12:33:49 +0000 (14:33 +0200)
also pushing the rebased/merged branch should only be done if all tests have
passed! hence, we shouldn't push the merged branch already in debian_build.
instead, we will try to find solutions to make jenkins push the branch using
post-build actions

debian_build.py

index 4f88661ded8bdc8cc66d3a28213662bdb4ed746b..73085c2b2738585897d65a35fcaaf4a684d6ecdd 100755 (executable)
@@ -343,17 +343,14 @@ if __name__ == '__main__':
             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(dst_branch)
+            gitrepo.git.rebase('origin/' + dst_branch)
             gitrepo.git.checkout(dst_branch)
+            gitrepo.git.pull()
             gitrepo.git.merge(src_branch)
             logger.info('Checked out "{dst_branch}" branch after rebase and merge completed from branch "{src_branch}".'.format(
                 dst_branch=dst_branch,
                 src_branch=src_branch,
             ))
-            # if this rebased/merged branch builds successful, push changes to 
-            # integration branch and let this branch rebuild and finally tag the 
-            # commit
-            do_push = True
 
         if 'no-test' in commit_triggers:
             # debian/rules from vdc-bundles determines maven options for tests
@@ -488,17 +485,6 @@ if __name__ == '__main__':
         except:
             pass
 
-    # .. push the auto-merged branch into integration:
-    if do_push:
-        try:
-            gitrepo.git.push('origin', 'integration:integration')
-            logger.info('Check "integration-*"-job for the follow-up build.')
-            figlet('Push OK')
-        except Exception as error:
-            logger.error('Could not push to "integration": ', exc_info=error)
-            figlet('Push failed')
-            exit_error()
-        
     # .. let's tag
     if not do_tagging:
         figlet('Tagging skipped')