From: Mathias Klette Date: Fri, 21 Jun 2013 11:33:31 +0000 (+0200) Subject: move GIT_BRANCH_NAME definitions from common_code to debian_build (again) X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=98ea8326169be3819bc7b935613b1a73e6732758;p=profitbricks%2Fjenkins-build-scripts.git move GIT_BRANCH_NAME definitions from common_code to debian_build (again) --- diff --git a/common_code.py b/common_code.py index 2cb344c..aaa3637 100755 --- a/common_code.py +++ b/common_code.py @@ -31,7 +31,7 @@ def logger_init( else: log_level = logging.DEBUG except KeyError as e: - log_level = logging.NOTSET + log_level = logging.WARN logging.basicConfig( format = log_format, @@ -52,9 +52,6 @@ def exit_error(): ENV = os.environ ENV.setdefault('ARGV',' '.join(sys.argv)) ENV.setdefault('CWD',os.getcwd()) -ENV.setdefault('GIT_BRANCH_NAME', ENV['GIT_BRANCH']) -if ENV['GIT_BRANCH'] != ENV['GIT_BRANCH_NAME']: - ENV['GIT_BRANCH'] = ENV['GIT_BRANCH_NAME'] BIN_DCH = '/usr/bin/dch' BIN_DPUT = '/usr/bin/dput' diff --git a/debian_build.py b/debian_build.py index ae16261..6ed54bb 100755 --- a/debian_build.py +++ b/debian_build.py @@ -34,6 +34,9 @@ logger = logger_init(re.match('^(.*/jenkins_build_script/)(.*)',__file__).groups # jenkins environment - parameters ENV.setdefault('NO_UPLOAD', '') ENV.setdefault('BUILD_TRIGGERS', '') +ENV.setdefault('GIT_BRANCH_NAME', ENV['GIT_BRANCH']) +if ENV['GIT_BRANCH'] != ENV['GIT_BRANCH_NAME']: + ENV['GIT_BRANCH'] = ENV['GIT_BRANCH_NAME'] #ENV.setdefault('DISTRIBUTION', 'squeeze') #GIT_REPO_PATH = ENV['GIT_REPO_PATH']