From 8f5868cb17c6a27403340f698c3b7d241c4458a3 Mon Sep 17 00:00:00 2001 From: Mathias Klette Date: Tue, 4 Jun 2013 13:12:26 +0200 Subject: [PATCH] debian_build: less code for trigger handling --- debian_build.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/debian_build.py b/debian_build.py index f340f3e..ecea878 100755 --- a/debian_build.py +++ b/debian_build.py @@ -109,7 +109,6 @@ if __name__ == '__main__': do_liveboot_request = False do_reports = True do_tagging = False - do_triggers = False do_uploads = True cl = changelog.Changelog() @@ -149,12 +148,6 @@ if __name__ == '__main__': )) curr_dist = 'squeeze' - 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']) - if re.match(STABLE_BRANCHES_RE, ENV['GIT_BRANCH']): if re.match('^(ps_|dev_).*$', ENV['JOB_NAME']): logger.error('Use the appropriate job to build for branch "{branch}"!'.format( @@ -270,10 +263,6 @@ if __name__ == '__main__': logger.debug('PB_SUITE: {suite}'.format( suite=pb_suite, )) - if do_triggers: - logger.debug('Triggers found: {tags}.'.format( - tags=', '.join(build_triggers), - )) if do_tagging: logger.debug('Tag to create: {tag}'.format( tag=new_tag, @@ -323,9 +312,12 @@ if __name__ == '__main__': figlet('Cleanup OK') # .. do some CI magic now, if requested - if do_triggers: + if not re.match(COMMIT_TRIGGER_BRANCHES_RE, ENV['GIT_BRANCH']): + logger.info('Not evaluating triggers for branch ' + ENV['GIT_BRANCH']) + else: + build_triggers = ENV['BUILD_TRIGGERS'].split() - if 'merge' in build_triggers and local_branch != 'integration': + if 'merge' in build_triggers: if 'no-test' in build_triggers: logger.info('Force building with tests as we also merge your branch.') build_triggers.remove('no-test') -- 2.39.5