From: Holger Levsen Date: Thu, 12 Jan 2012 09:34:08 +0000 (+0100) Subject: support new parameter, NO_UPLOAD, to do exactly that X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=da78da63564e4d3bff345f8107d89819aa4ee6d3;p=profitbricks%2Fjenkins-build-scripts.git support new parameter, NO_UPLOAD, to do exactly that --- diff --git a/debian_build.py b/debian_build.py index 5e6e261..d043b64 100755 --- a/debian_build.py +++ b/debian_build.py @@ -73,6 +73,8 @@ DPUT_OPTIONS = { } DPUT_CF = os.path.join(GIT_TARGET_WORKSPACE, 'dput.cf') +NO_UPLOAD = os.environ.get('NO_UPLOAD') + log_format = '%(asctime)s %(name)s[%(process)d] %(levelname)s: %(message)s' formatter = Formatter(log_format) logging.basicConfig( @@ -437,8 +439,9 @@ if __name__ == '__main__': fh = open(changes_file, 'r') logger.info('%s' % (fh.read())) fh.close() - # upload - dput_package_upload(changes_file) + # upload (if NO_UPLOAD is not set) + if NO_UPLOAD == "None": + dput_package_upload(changes_file) except Exception, error: logger.exception(error) exit_error()