From: Holger Levsen Date: Tue, 13 Sep 2011 15:59:05 +0000 (+0200) Subject: support profitbricks suites X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=6e553abcba39654ca4d2b02e7453a5958aad856b;p=profitbricks%2Fjenkins-build-scripts.git support profitbricks suites --- diff --git a/build.py b/build.py index 93f7d9c..ec6986e 100755 --- 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') diff --git a/lib/git_buildpackage.py b/lib/git_buildpackage.py index b54c6f0..65bfa8f 100644 --- a/lib/git_buildpackage.py +++ b/lib/git_buildpackage.py @@ -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,