From: Mathias Klette Date: Tue, 4 Jun 2013 10:14:51 +0000 (+0200) Subject: debian_build: os.environ object does not allow assignment of a list X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=992352680fb3053f2a0d8f4a63fffbc6ad9b9eed;p=profitbricks%2Fjenkins-build-scripts.git debian_build: os.environ object does not allow assignment of a list --- diff --git a/debian_build.py b/debian_build.py index b54b498..d24f882 100755 --- a/debian_build.py +++ b/debian_build.py @@ -35,7 +35,6 @@ ENV.setdefault('NO_UPLOAD', '') ENV.setdefault('BUILD_TRIGGERS', '') #ENV.setdefault('DISTRIBUTION', 'squeeze') #GIT_REPO_PATH = ENV['GIT_REPO_PATH'] -ENV['BUILD_TRIGGERS'] = ENV['BUILD_TRIGGERS'].split() # local constants BUILD_START = datetime.datetime.now() @@ -152,6 +151,7 @@ if __name__ == '__main__': if re.match(COMMIT_TRIGGER_BRANCHES_RE, ENV['GIT_BRANCH']): do_triggers = True + build_triggers = ENV['BUILD_TRIGGERS'].split() else: logger.info('Not evaluating triggers for branch ' + ENV['GIT_BRANCH']) @@ -325,10 +325,10 @@ if __name__ == '__main__': # .. do some CI magic now, if requested if do_triggers: - if 'merge' in ENV['BUILD_TRIGGERS'] and local_branch != 'integration': - if 'no-test' in ENV['BUILD_TRIGGERS']: + if 'merge' in build_triggers and local_branch != 'integration': + if 'no-test' in build_triggers: logger.info('Force building with tests as we also merge your branch.') - ENV['BUILD_TRIGGERS'].remove('no-test') + build_triggers.remove('no-test') try: src_branch = local_branch # save the original branch @@ -345,7 +345,7 @@ if __name__ == '__main__': except Exception as error: logger.error('Rebase has failed!', exc_info=error) - if 'no-test' in ENV['BUILD_TRIGGERS']: + if 'no-test' in build_triggers: # debian/rules from vdc-bundles determines maven options for tests # depending whether DEB_NOTEST environment variable is defined # FIXME: ensure this environment variable is available in chroot