]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
support profitbricks suites
authorHolger Levsen <holger@layer-acht.org>
Tue, 13 Sep 2011 15:59:05 +0000 (17:59 +0200)
committerHolger Levsen <holger@layer-acht.org>
Tue, 13 Sep 2011 15:59:05 +0000 (17:59 +0200)
build.py
lib/git_buildpackage.py

index 93f7d9ce9797c7f4078eaf1739856f959a6ae1b4..ec6986ea85e6f1a91de3492ea8667ba18c2a5b62 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -410,11 +410,19 @@ if __name__ == '__main__':
         else:
             raise Exception('No git_committer_email found')
 
+    if options.distribution in ('unstable' , 'experimental', 'pre-staging'):
+      pb_suite='pre-staging'
+    elif options.distribution in ('testing', 'staging'):
+      pb_suite='staging'
+    elif options.distribution in ('production', 'production-proposed-updates'):
+      pb_suite='production-proposed-updates'
+       
     gbp = git_buildpackage.GitBuildPackage(
             upstream_branch=GIT_UPSTREAM_BRANCH,
             debian_branch=GIT_DEBIAN_BRANCH,
             dist='squeeze',
-            arch='amd64'
+            arch='amd64',
+           pb_suite=pb_suite
     )
 
     logger.info('starting git-buildpackage')
index b54c6f0800a121cd6613d7fe0de3876bd2433290..65bfa8f6e63257da9b79008ec2250d8216327a0b 100644 (file)
@@ -15,11 +15,12 @@ BIN_SUDO = '/usr/bin/sudo'
 # --git-debian-branch=debian --git-tag
 class GitBuildPackage(object):
     def __init__(self, upstream_branch=None,
-            debian_branch=None, dist=None, arch=None):
+            debian_branch=None, dist=None, arch=None, pb_suite=None):
         self.upstream_branch = upstream_branch
         self.debian_branch = debian_branch
         self.dist = dist
         self.arch = arch
+       self.pb_suite = pb_suite
 
 
     def build(self):
@@ -33,6 +34,7 @@ class GitBuildPackage(object):
 
         env = os.environ
         env['DIST'] = self.dist
+        env['PB_SUITE'] = self.pb_suite
 
         cmdobj = subprocess.Popen(
                 cmd,