logger = logging.getLogger(__file__)
logger.setLevel(logging.DEBUG)
+def logger_loud_error(msg):
+ logger.error('#######################################################################'
+ logger.error('#######################################################################'
+ logger.error(msg)
+ logger.error('#######################################################################'
+ logger.error('#######################################################################'
+
def send_email(result):
smtp = smtplib.SMTP(SMTP_SERVER)
if result == SMTP_BUILD_ERROR:
if git_helper.git_clone_remote_repository(GIT_REPO_PATH, GIT_TARGET_DIR):
logger.info('git clone was successfull')
else:
- logger.info('git clone was not successfull')
+ logger_loud_error('git clone was not successfull')
exit_error()
atexit.register(remove_git_target_workspace)
GIT_UPSTREAM_BRANCH
)
else:
- logger.error('Could not determine GIT_DEBIAN_BRANCH')
+ logger_loud_error('Could not determine GIT_DEBIAN_BRANCH')
exit_error()
elif not GIT_UPSTREAM_BRANCH:
if GIT_DEBIAN_BRANCH:
GIT_UPSTREAM_BRANCH
)
else:
- logger.error('Could not determine GIT_UPSTREAM_BRANCH')
+ logger_loud_error('Could not determine GIT_UPSTREAM_BRANCH')
exit_error()
repo = git.repo.Repo()
if git_helper.git_checkout_branch(GIT_UPSTREAM_BRANCH):
logger.info('git checkout %s was successfull' % GIT_UPSTREAM_BRANCH)
else:
- logger.info('git checkout %s was not successfull' % GIT_UPSTREAM_BRANCH)
+ logger_loud_error('git checkout %s was not successfull' % GIT_UPSTREAM_BRANCH)
exit_error()
cmd = ['dpkg-parsechangelog']
)
ret = parse_changelog.wait()
if ret:
+ logger_loud_error('%s was not successfull, return code was %s ' % (' '.join(cmd), ret))
raise Exception(
'%s was not successfull, return code was %s ' % (' '.join(cmd), ret)
)
)
ret = grep_dctrl.wait()
if ret:
+ logger_loud_error('%s was not successfull, return code was %s ' % (' '.join(cmd), ret))
raise Exception(
'%s was not successfull, return code was %s ' % (' '.join(cmd), ret)
)
distribution = distribution.strip()
logger.info('Packet distribution is %s' % (distribution))
if (options.distribution in ('testing', 'staging') and not distribution in ('testing', 'staging')) or (options.distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates') and not distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates')):
+ logger_loud_error('Distribution %s in debian/changelog did not match branch %s' % (distribution, options.distribution))
raise Exception(
'Distribution %s in debian/changelog did not match branch %s' % (distribution, options.distribution)
)
logger.info('starting git-buildpackage')
ret = gbp.build()
if ret:
- logger.error(
+ logger_loud_error(
'git-buildpackage returned non-zero. exitcode was: %s', ret
)
exit_error()