From: Holger Levsen Date: Tue, 13 Mar 2012 17:53:36 +0000 (+0100) Subject: let jenkins tag the build X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=2a90d37c7075de7a21b8965b21787aa61283c00b;p=profitbricks%2Fjenkins-build-scripts.git let jenkins tag the build --- diff --git a/debian_build.py b/debian_build.py index 900e7a1..69e38b2 100755 --- a/debian_build.py +++ b/debian_build.py @@ -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()