From 98878bdd81de797ad9e146bd8ed6cd4e05572af8 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 12 Apr 2013 10:18:50 -0700 Subject: [PATCH] Add zmq-event-publisher Jenkins plugin to Gerrit. Create a new project under openstack-infra for the zmq-event-publisher Jenkins plugin. We are actually beginning to use this plugin for logstash so it should follow our normal processes for code review and merging. The gearman-plugin project uses the same sort of build and package steps so these Jenkins jobs have been converted to a set of templates in a job group that both plugins can use. Change-Id: I2bab79506119b1c04a8e9d48bc66f1a609426324 Reviewed-on: https://review.openstack.org/26872 Reviewed-by: Jeremy Stanley Reviewed-by: Khai Do Reviewed-by: James E. Blair Approved: Clark Boylan Tested-by: Jenkins --- .../zmq-event-publisher.config | 11 +++++++++ ...n-plugin.yaml => jenkins-plugin-jobs.yaml} | 24 ++++++++++++------- .../jenkins_job_builder/config/projects.yaml | 15 ++++++++++++ .../openstack_project/files/zuul/layout.yaml | 10 +++++++- .../templates/review.projects.yaml.erb | 3 +++ 5 files changed, 53 insertions(+), 10 deletions(-) create mode 100644 modules/openstack_project/files/gerrit/acls/openstack-infra/zmq-event-publisher.config rename modules/openstack_project/files/jenkins_job_builder/config/{gearman-plugin.yaml => jenkins-plugin-jobs.yaml} (63%) diff --git a/modules/openstack_project/files/gerrit/acls/openstack-infra/zmq-event-publisher.config b/modules/openstack_project/files/gerrit/acls/openstack-infra/zmq-event-publisher.config new file mode 100644 index 0000000000..d79ee898a8 --- /dev/null +++ b/modules/openstack_project/files/gerrit/acls/openstack-infra/zmq-event-publisher.config @@ -0,0 +1,11 @@ +[access "refs/heads/*"] + label-Code-Review = -2..+2 group openstack-ci-core + label-Approved = +0..+1 group openstack-ci-core + workInProgress = group openstack-ci-core +[project] + state = active +[receive] + requireChangeId = true + requireContributorAgreement = true +[submit] + mergeContent = true diff --git a/modules/openstack_project/files/jenkins_job_builder/config/gearman-plugin.yaml b/modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml similarity index 63% rename from modules/openstack_project/files/jenkins_job_builder/config/gearman-plugin.yaml rename to modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml index eb7600e609..892e8deba2 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/gearman-plugin.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml @@ -1,5 +1,5 @@ -- job: - name: gate-gearman-plugin-build +- job-template: + name: 'gate-{name}-build' project-type: maven node: quantal && !jclouds @@ -12,16 +12,16 @@ maven: maven-name: Maven3 root-module: - group-id: org.jenkins-ci.plugins - artifact-id: gearman-plugin + group-id: '{maven-group-id}' + artifact-id: '{name}' root-pom: pom.xml goals: 'clean package' publishers: - console-log -- job: - name: gearman-plugin-tarball +- job-template: + name: '{name}-hpi-artifact' project-type: maven node: quantal && !jclouds @@ -34,14 +34,20 @@ maven: maven-name: Maven3 root-module: - group-id: org.jenkins-ci.plugins - artifact-id: gearman-plugin + group-id: '{maven-group-id}' + artifact-id: '{name}' root-pom: pom.xml goals: 'clean package -Dmaven.test.skip=true' publishers: - war: site: 'tarballs.openstack.org' - warfile: 'target/gearman-plugin.hpi' + warfile: 'target/{name}.hpi' target: 'tarballs/ci/' - console-log-post + +- job-group: + name: jenkins-plugin-jobs + jobs: + - 'gate-{name}-build' + - '{name}-hpi-artifact' diff --git a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml index 55c38941c1..64c33d9234 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml @@ -171,10 +171,25 @@ - project: name: gearman-plugin + maven-group-id: org.jenkins-ci.plugins github-org: openstack-infra node: quantal tarball-site: tarballs.openstack.org + jobs: + - jenkins-plugin-jobs + + +- project: + name: zmq-event-publisher + maven-group-id: org.jenkins-ci.plugins + github-org: openstack-infra + node: quantal + tarball-site: tarballs.openstack.org + + jobs: + - jenkins-plugin-jobs + - project: name: git-review diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index ed0d0dc0eb..e1e9e643e7 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -1465,7 +1465,15 @@ projects: gate: - gate-gearman-plugin-build post: - - gearman-plugin-tarball + - gearman-plugin-hpi-artifact + + - name: openstack-infra/zmq-event-publisher + check: + - gate-zmq-event-publisher-build + gate: + - gate-zmq-event-publisher-build + post: + - zmq-event-publisher-hpi-artifact - name: stackforge/database-api check: diff --git a/modules/openstack_project/templates/review.projects.yaml.erb b/modules/openstack_project/templates/review.projects.yaml.erb index 613db39ede..3db9717d8e 100644 --- a/modules/openstack_project/templates/review.projects.yaml.erb +++ b/modules/openstack_project/templates/review.projects.yaml.erb @@ -44,6 +44,9 @@ description: OpenStack code review report generator - project: openstack-infra/statusbot description: Infrastructure status update IRC bot +- project: openstack-infra/zmq-event-publisher + description: Jenkins plugin to publish build events via ZMQ PUB SUB. + upstream: git://github.com/cboylan/zmq-event-publisher.git - project: openstack-infra/zuul - project: openstack-dev/devstack - project: openstack-dev/grenade