From ed53b4fb57e60320d929fd227b5fef66ca42c76b Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 23 May 2013 22:57:52 +0100 Subject: Allow projects specify which debian releases to build on --- jenkinstool | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 16 deletions(-) (limited to 'jenkinstool') diff --git a/jenkinstool b/jenkinstool index 21197d5..a16630e 100755 --- a/jenkinstool +++ b/jenkinstool @@ -383,28 +383,49 @@ setup_pbuilder "$pbuilder_release_tgz" yes jobs.append(self.vcs_watch_job(localhost, project)) - for host in config['hosts']: + debian_wanted = project.get('debian', True) + if debian_wanted is True: + debian_hosts = config['hosts'] + elif type(debian_wanted) is list: + debian_hosts = [ + x for x in config['hosts'] + if x['debian-dist'] in debian_wanted] + else: + debian_hosts = [] + + for host in debian_hosts: jobs.append(self.prepare_worker_job(host, project)) jobs.append(self.build_job(host, project)) jobs.append(self.tarball_job(main_host, project)) - if project.get('debian', True): - done = set() - for host in config['hosts']: - if host['debian-dist'] not in done: - jobs.append(self.dsc_job(host, project)) - jobs.append(self.process_incoming_job( - config, localhost, project, 'dsc_%s' % host['name'])) - done.add(host['debian-dist']) - - build_all_dists = set() - for host in config['hosts']: - build_all = host['debian-dist'] not in build_all_dists - build_all_dists.add(host['debian-dist']) - jobs.append(self.deb_job(host, project, build_all)) + print + print "project:", project + print "debian_wanted:", repr(debian_wanted) + print "debian_hosts:", repr(debian_hosts) + + done = set() + for host in debian_hosts: + print "dsc, host:", repr(host['name']) + if host['debian-dist'] not in done: + jobs.append(self.dsc_job(host, project)) jobs.append(self.process_incoming_job( - config, localhost, project, 'deb_%s' % host['name'])) + config, localhost, project, 'dsc_%s' % host['name'])) + done.add(host['debian-dist']) + + build_all_dists = set() + for host in debian_hosts: + print "deb, host:", repr(host['name']) + build_all = host['debian-dist'] not in build_all_dists + build_all_dists.add(host['debian-dist']) + jobs.append(self.deb_job(host, project, build_all)) + jobs.append(self.process_incoming_job( + config, localhost, project, 'deb_%s' % host['name'])) + +# print "jobs:", repr(jobs) + for job in jobs: + print 'job:', repr(job.job_id()) +# raise SystemExit(1) return [(jc.job_id(), jc.tostring()) for jc in jobs] -- cgit v1.2.1