]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
raise an exception when checkout fails
authorMathias Klette <mathias.klette@profitbricks.com>
Tue, 15 May 2012 11:52:59 +0000 (13:52 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Tue, 15 May 2012 11:52:59 +0000 (13:52 +0200)
debian_build.py

index e6e50406e42a96d6d52c7f620e1d5f89ffc08af4..8979b8bee63e3971dd336884989e3ceee2ddefa3 100755 (executable)
@@ -252,10 +252,10 @@ if __name__ == '__main__':
     repo = git.repo.Repo()
 
     #if GIT_BRANCH_NAME != 'master':
-    git_helper.git_new_branch_from(
-                GIT_BRANCH_NAME,
-                os.path.join('origin', GIT_BRANCH_NAME)
-        )
+    localname = GIT_BRANCH_NAME
+    remotename = os.path.join('origin', GIT_BRANCH_NAME) 
+    if not git_helper.git_new_branch_from(localname,remotename):
+        raise Exception('Checkout of %s was not successfull.' %( remotename ))
 
     # we need to make sure our jenkins config is used, so let's delete any 
     # other config available in repository that might be prefered