]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
add support for auto-releases of master branch (for ri- and so-docs)
authorHolger Levsen <holger@layer-acht.org>
Tue, 16 Apr 2013 16:13:59 +0000 (18:13 +0200)
committerHolger Levsen <holger@layer-acht.org>
Tue, 16 Apr 2013 16:13:59 +0000 (18:13 +0200)
debian_build.py

index e6b2f47aa745dcdcaf272c88ebed07d2eeeaca46..5b5653a138ef003bccb5b63f0ba9c286041e65e8 100755 (executable)
@@ -293,6 +293,15 @@ if __name__ == '__main__':
     else:
         logger.debug('Status is now:\n%s' %( gitcmd.status().strip() ))
 
+    if (BUILD_JOBNAME == 'ri-docs' or BUILD_JOBNAME == 'so-docs') and GIT_BRANCH_NAME == 'master':
+        cmd = ['/usr/bin/git-dch', '-R', '-a']
+        subprocess.check_call(cmd)
+        cmd = ['/usr/bin/git', 'commit', '-a', '-s', '-m', 'Released by jenkins']
+        subprocess.check_call(cmd)
+        cmd = ['/usr/bin/git', 'push', 'origin', 'master']
+        subprocess.check_call(cmd)
+        logger.info('Releeeeeased!!!')
+
     # cleanup existing *orig.tar.gz
     if os.path.isdir(BUILD_AREA):
         files = [os.path.join(BUILD_AREA,file) for file in fnmatch.filter(os.listdir(BUILD_AREA),'*.orig.tar.gz')]