return parser.parse_args()
-def upload_to_archive01(archive01_target, archive01_dist, changes_file, logger):
+def upload_to_apt_repository(apt_target, apt_dist, changes_file, logger):
try:
- # Change distribution for archive01 in changes file
- cmd = ['sed', '-i', r's/^\(Distribution: \).*$/\1' + archive01_dist + '/',
+ # Change distribution for new apt repository in changes file
+ cmd = ['sed', '-i', r's/^\(Distribution: \).*$/\1' + apt_dist + '/',
changes_file]
command = ' '.join(cmd)
logger.debug('Executing "{command}" ...'.format(command=command))
logger.warn('%s failed.' % command)
return
- cmd = ['dput', archive01_target, changes_file]
+ cmd = ['dput', apt_target, changes_file]
command = ' '.join(cmd)
logger.debug('Executing "{command}" ...'.format(command=command))
if subprocess.call(cmd) == 0:
else:
logger.warn('%s failed.' % command)
except Exception as error:
- logger.warning("Experimental upload to http://archive01.pb.local failed. "
+ logger.warning("Experimental upload to http://apt01.pb.local failed. "
"See above for details.", exc_info=error)
new_version = curr_version + options.version_suffix
pb_suite = 'master-{dist}'.format(dist=curr_dist)
reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist)
- archive01_dist = curr_dist
- archive01_target = "archive01-debian"
+ apt_dist = curr_dist
+ apt_target = "apt01-debian"
# replace valid debian version chars that are invalid for git tagging
new_tag = curr_version.replace('~', '_').replace(':', ',')
)
pb_suite = 'develop-{dist}'.format(dist=curr_dist)
reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist)
- archive01_dist = curr_dist + '-dev'
- archive01_target = "archive01-debian"
+ apt_dist = curr_dist + '-dev'
+ apt_target = "apt01-debian"
# reset actions
# .. always include successful build packages into CIDB
if curr_dist == 'squeeze':
suffix=options.version_suffix,
)
reprepro_base = '/srv/dev-{dist}'.format(dist=curr_dist)
- archive01_dist = curr_dist + "-" + local_branch.replace("/", "-")
- archive01_target = "archive01-debian-dev"
+ apt_dist = curr_dist + "-" + local_branch.replace("/", "-")
+ apt_target = "apt01-debian-dev"
else:
logger.error('Don\'t know how to handle branch "{branch}".'.format(
figlet('Upload OK')
- upload_to_archive01(archive01_target, archive01_dist, changes_file, logger)
+ upload_to_apt_repository(apt_target, apt_dist, changes_file, logger)
except Exception as error:
logger.error('Upload failed. See above for details.', exc_info=error)