summaryrefslogtreecommitdiff
path: root/jenkinstool
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-05-23 22:57:52 +0100
committerLars Wirzenius <liw@liw.fi>2013-05-23 22:57:52 +0100
commited53b4fb57e60320d929fd227b5fef66ca42c76b (patch)
tree250b302f97b90cd81a25cdf9ef451811730867bd /jenkinstool
parent45d0df026e01b4245b3fe8ff2a0190ace8d1ccc0 (diff)
downloadjenkinstool-ed53b4fb57e60320d929fd227b5fef66ca42c76b.tar.gz
Allow projects specify which debian releases to build on
Diffstat (limited to 'jenkinstool')
-rwxr-xr-xjenkinstool53
1 files changed, 37 insertions, 16 deletions
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]