From 2ba9ba7a4d94a550a60a84a784d5cea68d317d17 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 1 Aug 2012 09:38:14 -0700 Subject: [PATCH] Switch zuul to jenkins python jobs template. Switch zuul jenkins jobs config to use the python jobs template. The gate-zuul-pyflakes job has been kept though. Add zuul-docs job as well. Configure the zuul layout to gate zuul on python26 and python27 jobs. Also configured to run the zuul-coverage job and zuul-docs job post merge. Change-Id: Ib3500c361bca0e2c35fa9552b0aa98468d2f040f --- .../jenkins_jobs/files/modules/publishers.py | 19 ++++++- .../files/projects/openstack/zuul.yml | 54 +++++++++---------- .../openstack_project/files/zuul/layout.yaml | 11 ++++ 3 files changed, 56 insertions(+), 28 deletions(-) diff --git a/modules/jenkins_jobs/files/modules/publishers.py b/modules/jenkins_jobs/files/modules/publishers.py index 41f33fdbb4..a2022d75b6 100644 --- a/modules/jenkins_jobs/files/modules/publishers.py +++ b/modules/jenkins_jobs/files/modules/publishers.py @@ -180,7 +180,6 @@ class Publishers(object): transfers = XML.SubElement(ftp, 'transfers') ftp_transfers = XML.SubElement(transfers, 'jenkins.plugins.publish__over__ftp.BapFtpTransfer') - # TODO: the next four fields are where the magic happens. Fill them in. XML.SubElement(ftp_transfers, 'remoteDirectory').text = data['remote_dir'] XML.SubElement(ftp_transfers, 'sourceFiles').text = data['source_files'] XML.SubElement(ftp_transfers, 'excludes').text = data['excludes'] @@ -310,3 +309,21 @@ class Publishers(object): XML.SubElement(entry, 'filePath').text = data['target_path'] XML.SubElement(entry, 'sourceFile').text = data['warfile'] XML.SubElement(entry, 'keepHierarchy').text = 'false' + + # Jenkins Job module for generic scp publishing + # To use you add the following into your YAML: + # publish: + # site: 'openstack-ci.openstack.org' + # source: 'doc/build/html/**/*' + # target_path: 'ci/zuul' + # keep_heirarchy: 'true' + + def _publisher_scp(self, xml_parent, data): + site = data['site'] + scp = XML.SubElement(xml_parent, 'be.certipost.hudson.plugin.SCPRepositoryPublisher') + XML.SubElement(scp, 'siteName').text = site + entries = XML.SubElement(scp, 'entries') + entry = XML.SubElement(entries, 'be.certipost.hudson.plugin.Entry') + XML.SubElement(entry, 'filePath').text = data['target_path'] + XML.SubElement(entry, 'sourceFile').text = data['source'] + XML.SubElement(entry, 'keepHierarchy').text = data['keep_heirarchy'] diff --git a/modules/jenkins_jobs/files/projects/openstack/zuul.yml b/modules/jenkins_jobs/files/projects/openstack/zuul.yml index 8106aedaa1..010ef1fc3d 100644 --- a/modules/jenkins_jobs/files/projects/openstack/zuul.yml +++ b/modules/jenkins_jobs/files/projects/openstack/zuul.yml @@ -1,3 +1,13 @@ +project: + template: 'python_jobs' + +values: + name: 'zuul' + disabled: 'false' + github_org: 'openstack-ci' + review_site: 'review.openstack.org' + node: 'precise' + --- # pyflakes-gate main: @@ -21,48 +31,38 @@ assignednode: node: 'precise' --- -# pep8-gate +# zuul-docs main: - name: 'gate-zuul-pep8' + name: 'zuul-docs' review_site: 'review.openstack.org' github_org: 'openstack-ci' project: 'zuul' + authenticatedBuild: 'false' + disabled: 'false' concurrent: 'true' triggers: - - zuul + - zuul_post + +logrotate: + daysToKeep: 28 + numToKeep: -1 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 builders: - gerrit_git_prep - - pep8 + - docs post_build_actions: - - pep8 + - scp: + site: '173.203.107.207' + source: 'doc/build/html/**/*' + target_path: 'ci/zuul' + keep_heirarchy: 'true' scm: scm: 'false' assignednode: node: 'precise' - ---- -# merge-gate -main: - name: 'gate-zuul-merge' - review_site: 'review.openstack.org' - github_org: 'openstack-ci' - project: 'zuul' - concurrent: 'true' - -triggers: - - zuul - -builders: - - gerrit_git_prep - -scm: - scm: 'false' - -assignednode: - node: 'precise' - diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index 46b9363fc1..ce50f3e0c9 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -59,12 +59,23 @@ projects: - name: openstack-ci/zuul check: - gate-zuul-merge: + - gate-zuul-docs - gate-zuul-pep8 - gate-zuul-pyflakes + - gate-zuul-python26 + - gate-zuul-python27 gate: - gate-zuul-merge: + - gate-zuul-docs - gate-zuul-pep8 - gate-zuul-pyflakes + - gate-zuul-python26 + - gate-zuul-python27 + post: + - zuul-coverage + - zuul-docs + publish: + - zuul-docs - name: openstack-ci/pypi-mirror check: