diff options
-rwxr-xr-x | jenkinstool | 18 | ||||
-rw-r--r-- | simplejenkinsapi/jobconfig.py | 9 |
2 files changed, 0 insertions, 27 deletions
diff --git a/jenkinstool b/jenkinstool index 77288a3..e63f33b 100755 --- a/jenkinstool +++ b/jenkinstool @@ -216,18 +216,15 @@ class JobGenerator(object): # Setup reprepro on Jenkins host. reprepro = self.reprepro_setup_job(config) - jobs[-1].add_build_trigger(reprepro.job_id()) jobs.append(reprepro) # Create or update pbuilder tarballs. for host in config['hosts']: jc = self.pbuilder_create_job(host) - jobs[-1].add_build_trigger(jc.job_id()) jobs.append(jc) # Trigger all project pipelines. trigger = self.trigger_projects_job(config) - jobs[-1].add_build_trigger(trigger.job_id()) jobs.append(trigger) # Create a pipeline for each project. Every job in the pipeline @@ -238,26 +235,11 @@ class JobGenerator(object): prev = None for jc in self.generate_project(config, project): if prev: - prev.add_build_trigger(jc.job_id()) pipelines[project['name']].append(jc) else: pipelines[project['name']] = [jc] prev = jc jobs.append(jc) - - # Add triggers for each project pipeline: the last job of each of - # its build dependencies triggers the first job in the project's - # pipeline. Projects without build dependencies are triggered by - # the trigger-everything job. - for project in config['projects']: - first = pipelines[project['name']][0] - deps = project.get('build-depends', []) - if deps: - for dep in deps: - pipeline = pipelines[dep] - pipeline[-1].add_build_trigger(first.job_id()) - else: - trigger.add_build_trigger(first.job_id()) return [(jc.job_id(), jc.tostring()) for jc in jobs] diff --git a/simplejenkinsapi/jobconfig.py b/simplejenkinsapi/jobconfig.py index 7aab101..286269d 100644 --- a/simplejenkinsapi/jobconfig.py +++ b/simplejenkinsapi/jobconfig.py @@ -109,15 +109,6 @@ cd "%(host.directory)s" suffix = '\nEND' self.add_shell_command(prefix + shell_text + suffix) - def add_build_trigger(self, job_id): - publishers = self._project.find('publishers') - trigger = ET.SubElement(publishers, 'hudson.tasks.BuildTrigger') - ET.SubElement(trigger, 'childProjects').text = job_id - threshold = ET.SubElement(trigger, 'threshold') - ET.SubElement(threshold, 'name').text = 'SUCCESS' - ET.SubElement(threshold, 'ordinal').text = '0' - ET.SubElement(threshold, 'color').text = 'BLUE' - def set_bzr(self, url): scm = self._project.find('scm') scm.clear() |