diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-08-11 18:45:49 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-08-11 18:45:49 +0100 |
commit | 8a806f2c73df3f7d9ecea71c85f2f2fdd98809e0 (patch) | |
tree | 67eeb576002e83dd114eed7ef9048cb016cee469 /jenkinstool | |
parent | 381a73e5644ea23dae813d4ef3b32319c63c1560 (diff) | |
download | jenkinstool-8a806f2c73df3f7d9ecea71c85f2f2fdd98809e0.tar.gz |
Trigger later jobs for the same project
Diffstat (limited to 'jenkinstool')
-rwxr-xr-x | jenkinstool | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/jenkinstool b/jenkinstool index f968789..5a10974 100755 --- a/jenkinstool +++ b/jenkinstool @@ -73,14 +73,22 @@ class JobGenerator(object): def generate_project(self, config, project): '''Generate all the jobs for a given project.''' main_host = config['hosts'][0] + jobs = [] for host in config['hosts']: - yield self.build_job(host, project) + jobs.append(self.build_job(host, project)) - yield self.tarball_job(main_host, project) + jobs.append(self.tarball_job(main_host, project)) for host in config['hosts']: - yield self.dsc_job(host, project) + jobs.append(self.dsc_job(host, project)) + + for i in range(1, len(jobs)): + prev = jobs[i-1] + this = jobs[i] + prev.add_build_trigger(this.job_id()) + + return jobs def build_job(self, host, project): '''Generate a job to build a given project on a given host.''' |