From: Benjamin Drung Date: Wed, 23 Jul 2014 14:12:42 +0000 (+0200) Subject: Drop PB_SUITE environment variable. X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=4e7809d1081ed10eaebc5f2f679857fb82f4d00a;p=profitbricks%2Fjenkins-build-scripts.git Drop PB_SUITE environment variable. --- diff --git a/debian_build.py b/debian_build.py index 60e258e..b07353a 100755 --- a/debian_build.py +++ b/debian_build.py @@ -279,7 +279,6 @@ if __name__ == '__main__': new_dist = curr_dist alexandria_dist = 'stable' new_version = curr_version + options.version_suffix - pb_suite = 'master-{dist}'.format(dist=curr_dist) reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist) apt_target = "repo01-debian" @@ -335,7 +334,6 @@ if __name__ == '__main__': pattern = "{debversion}+develop{time:%Y%m%d+%H%M}+{build}+{git-commit}" pattern = re.sub('{build}', ENV['BUILD_NUMBER'], pattern) + options.version_suffix new_version = version_substitution(logger, pattern, curr_commit) - pb_suite = 'develop-{dist}'.format(dist=curr_dist) reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist) apt_target = "repo01-debian-dev" # reset actions @@ -353,10 +351,8 @@ if __name__ == '__main__': new_dist = curr_dist + "-" + local_branch.replace("/", "-") if curr_dist == "wheezy": alexandria_dist = "wheezy-dev-{0}".format(local_branch.replace("/", "-")) - pb_suite = alexandria_dist else: alexandria_dist = 'dev-{0}'.format(local_branch.replace("/", "-")) - pb_suite = alexandria_dist if cl.distributions == "UNRELEASED": pattern = "{debversion}~experimental{time:%Y%m%d+%H%M}+{build}+{git-commit}" else: @@ -414,9 +410,6 @@ if __name__ == '__main__': old_version=curr_version, new_version=new_version, )) - logger.info('PB_SUITE (used by pbuilder): {suite}'.format( - suite=pb_suite, - )) if do_tagging: logger.info('Tag to create: {tag}'.format( tag=new_tag, @@ -608,7 +601,6 @@ if __name__ == '__main__': dsc_file=source_builder.dsc_file, dist=curr_dist, arch='amd64', - pb_suite=pb_suite, git_commit_id=curr_commit_hexsha[0:7], ) if ret == 0: diff --git a/lib/git_buildpackage.py b/lib/git_buildpackage.py index c7c074c..4479499 100644 --- a/lib/git_buildpackage.py +++ b/lib/git_buildpackage.py @@ -12,12 +12,11 @@ BIN_GIT_BUILDPACKAGE = '/usr/bin/git-buildpackage' BIN_SUDO = '/usr/bin/sudo' class GitBuildPackage(object): - def __init__(self, + def __init__(self, upstream_branch=None, - debian_branch=None, + debian_branch=None, dist=None, - arch=None, - pb_suite=None, + arch=None, git_commit_id=None ): ''' @@ -27,7 +26,6 @@ class GitBuildPackage(object): self.debian_branch = debian_branch self.dist = dist self.arch = arch - self.pb_suite = pb_suite self.git_commit_id = git_commit_id @property @@ -37,7 +35,6 @@ class GitBuildPackage(object): ''' result = os.environ result['DIST'] = self.dist - result['PB_SUITE'] = self.pb_suite result['GIT_COMMIT_ID'] = self.git_commit_id return result @@ -60,14 +57,14 @@ class GitBuildPackage(object): ''' TODO ''' - # if we would build orig.tar.gz we would need to be able to access - # them later, which we probably could achieve with using pristine-tar - # and storing that in the git repo - but this has the downside that + # if we would build orig.tar.gz we would need to be able to access + # them later, which we probably could achieve with using pristine-tar + # and storing that in the git repo - but this has the downside that # the jenkins build job would need to push this back into the git repo - # (so this makes things complicated) and then still, we could not - # gurantee that this orig.tar.gz actually reflects the git repo at + # (so this makes things complicated) and then still, we could not + # gurantee that this orig.tar.gz actually reflects the git repo at # that point. - # So in summary, it would be expensive and buys as nothing, as we + # So in summary, it would be expensive and buys as nothing, as we # can always generate the source from said git repos... cmdobj = subprocess.Popen( diff --git a/lib/pbuilder.py b/lib/pbuilder.py index c1a4f8d..21aec06 100644 --- a/lib/pbuilder.py +++ b/lib/pbuilder.py @@ -17,7 +17,6 @@ class Pbuilder(object): dsc_file=None, dist=None, arch=None, - pb_suite=None, git_commit_id=None, ): ''' @@ -26,7 +25,6 @@ class Pbuilder(object): self.dsc_file = dsc_file self.dist = dist self.arch = arch - self.pb_suite = pb_suite self.git_commit_id = git_commit_id @property @@ -37,7 +35,6 @@ class Pbuilder(object): result = os.environ result['DIST'] = self.dist result['ARCHITECTURE'] = self.arch - result['PB_SUITE'] = self.pb_suite result['GIT_COMMIT_ID'] = self.git_commit_id return result