]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
let jenkins tag the build
authorHolger Levsen <holger@layer-acht.org>
Tue, 13 Mar 2012 17:53:36 +0000 (18:53 +0100)
committerHolger Levsen <holger@layer-acht.org>
Tue, 13 Mar 2012 17:53:36 +0000 (18:53 +0100)
debian_build.py

index 900e7a1652016681577c08b75c098214cbb7327e..69e38b22561d41251a2787820aa207ec5a930a4e 100755 (executable)
@@ -463,5 +463,13 @@ if __name__ == '__main__':
             logger.exception(error)
             exit_error()
 
+        # build was succesful, now let's tag it
+        if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/'):
+            cmd = ['/usr/bin/git', 'tag', version]
+            subprocess.check_call(cmd)
+            cmd = ['/usr/bin/git', 'push', 'origin', version]
+            subprocess.check_call(cmd)
+            # FIXME: intercept failures 
+
         exit_ok()