From: Mathias Klette Date: Tue, 4 Jun 2013 11:12:26 +0000 (+0200) Subject: debian_build: less code for trigger handling X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=8f5868cb17c6a27403340f698c3b7d241c4458a3;p=profitbricks%2Fjenkins-build-scripts.git debian_build: less code for trigger handling --- 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')