ENV.setdefault('NO_UPLOAD', '')
ENV.setdefault('BUILD_TRIGGERS', '')
ENV.setdefault('VERSION_SUFFIX', '')
+ENV.setdefault('REBUILD_DIST', '')
ENV.setdefault('GIT_BRANCH_NAME', ENV['GIT_BRANCH'])
if ENV['GIT_BRANCH'] != ENV['GIT_BRANCH_NAME']:
ENV['GIT_BRANCH'] = ENV['GIT_BRANCH_NAME']
# local constants
BUILD_START = datetime.datetime.now()
+SUPPORTED_DISTRIBUTIONS = ('squeeze', 'wheezy', 'jessie')
+
+DISTRO_SUFFIX = {
+ 'squeeze': '~deb6',
+ 'wheezy': '~deb7',
+ 'jessie': '~deb8',
+}
+
AUTO_CHANGELOG_REPONAMES = (
'so-docs',
'infrastructure-docs',
break
# Act II: make decissions
+ # change the distribution if REBUILD_DIST is set in the environment
+ rebuild_suffix = ''
+ if ENV['REBUILD_DIST'] in SUPPORTED_DISTRIBUTIONS:
+ logger.info('REBUILD_DIST is set. Change distribution {old} => {new}.'
+ .format(old=curr_dist, new=ENV['REBUILD_DIST']))
+ curr_dist = ENV['REBUILD_DIST']
+ rebuild_suffix = DISTRO_SUFFIX[ENV['REBUILD_DIST']]
+ elif ENV['REBUILD_DIST']:
+ logger.warn('REBUILD_DIST {dist} not supported. Please select from: {supported}'.format(
+ dist=ENV['REBUILD_DIST'],
+ supported=", ".join(SUPPORTED_DISTRIBUTIONS)
+ ))
+
# compatibility until call_jenkins was replaced
- if curr_dist not in ('squeeze', 'wheezy', 'jessie'):
+ if curr_dist not in SUPPORTED_DISTRIBUTIONS:
logger.warn('Compatibility Mode: Change distribution {old} => {new}.'.format(
old=curr_dist,
new='squeeze'
exit_error()
new_dist = curr_dist
alexandria_dist = 'stable'
- new_version = curr_version + options.version_suffix
+ new_version = curr_version + options.version_suffix + rebuild_suffix
reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist)
apt_target = "repo01-debian"
additional_repos = []