From: Mathias Klette Date: Wed, 5 Jun 2013 17:28:58 +0000 (+0200) Subject: debian_build: show help instructions for package build failures X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=de91366012062f6bc0b312ce47fd0e538510e022;p=profitbricks%2Fjenkins-build-scripts.git debian_build: show help instructions for package build failures --- diff --git a/debian_build.py b/debian_build.py index ecea878..bc8f32c 100755 --- a/debian_build.py +++ b/debian_build.py @@ -9,6 +9,7 @@ import git import optparse import os import re +import socket import subprocess import sys from ConfigParser import SafeConfigParser @@ -438,6 +439,22 @@ if __name__ == '__main__': 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')