]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build: push the merged feature/-branch to integration upon successful build
authorMathias Klette <mathias.klette@profitbricks.com>
Wed, 29 May 2013 13:46:19 +0000 (15:46 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Wed, 29 May 2013 13:46:19 +0000 (15:46 +0200)
debian_build.py

index 754ce52a9effe99c9caa3d2903a8010ab94d4a5c..4f88661ded8bdc8cc66d3a28213662bdb4ed746b 100755 (executable)
@@ -106,6 +106,7 @@ if __name__ == '__main__':
     do_cidb = False
     do_cleanup = True
     do_liveboot_request = False
+    do_push = False
     do_reports = True
     do_tagging = False
     do_triggers = False
@@ -349,6 +350,10 @@ if __name__ == '__main__':
                 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
@@ -483,6 +488,17 @@ 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')