import optparse
import os
import re
+import socket
import subprocess
import sys
from ConfigParser import SafeConfigParser
logger.error(
'git-buildpackage failed with exitcode {code}'.format(code=ret))
figlet('Build failed')
+ logger.info('''
+ In case you need to analyze errors within chroot, do the following:
+ * login to {hostname}
+ * become {jenkins_user}
+ * cd into {jenkins_workspace}
+ * export environment variables:
+ export {gpb_env} FORCE_SHELL=TRUE
+ * start build:
+ {command}
+ '''.format(
+ hostname=socket.gethostname(),
+ jenkins_user=ENV['USER'],
+ jenkins_workspace=ENV['WORKSPACE'],
+ gbp_env=' '.join(gbp.env),
+ command=gbp.command,
+ ))
exit_error()
else:
logger.debug('git-buildpackage executed successfully')