Add jenkins job to build gerrit plugins

There currently is no repository for non-core gerrit plugins so there isn't a way to
consume gerrit plugin binaries[1].  We need to build the binary from source so that it is
available for us to install into our gerrit deployment.  This change adds a periodic job
to build gerrit plugins.

[1] https://groups.google.com/d/msg/repo-discuss/M5eVf40B1MU/bj0wUa-dZFEJ

Partial-Bug: #1082781
Change-Id: Ibd915d26baff9d6c7ca376c55b66252f3061494f
This commit is contained in:
Khai Do 2014-01-29 15:23:45 -08:00
parent ac849407fa
commit b29f7edf96
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,41 @@
- job-template:
name: 'periodic-gerrit-plugin-{name}'
node: '{node}'
wrappers:
- timeout:
timeout: 30
fail: true
- timestamps
builders:
- shell: |
#!/bin/bash -xe
rm -rf gerrit
git clone -b {gerrit-branch} {gerrit-project}
git clone -b {plugin-branch} {plugin-project} gerrit/plugins/{plugin-name}
cd gerrit/plugins/{plugin-name}
/usr/local/jenkins/slave_scripts/maven-properties.sh
- inject:
properties-file: gerrit/plugins/{plugin-name}/maven.properties
- install-buck
- shell: |
#!/bin/bash -xe
export PATH=`pwd`/buck/bin:$PATH
cd gerrit
buck clean
buck build plugins/{plugin-name}:{plugin-name}
cp gerrit/buck-out/gen/plugins/{plugin-name}/{plugin-name}.jar gerrit/buck-out/gen/plugins/{plugin-name}/{plugin-name}-$PROJECT_VER.jar
publishers:
- war:
site: '{tarball-site}'
warfile: 'gerrit/buck-out/gen/plugins/{plugin-name}/{plugin-name}-${{PROJECT_VER}}.jar'
target: 'tarballs/ci/{name}'
- console-log
- job-group:
name: gerrit-plugin-jobs
jobs:
- 'periodic-gerrit-plugin-{name}'

View File

@ -494,6 +494,19 @@
jobs:
- maven-plugin-jobs
- project:
name: javamelody-gerrit-plugin
node: bare-precise
tarball-site: tarballs.openstack.org
gerrit-project: https://git.openstack.org/openstack-infra/gerrit
gerrit-branch: openstack/2.8.3
plugin-project: https://gerrit.googlesource.com/plugins/javamelody
plugin-name: javamelody
plugin-branch: stable-2.8
jobs:
- gerrit-plugin-jobs
- project:
name: zmq-event-publisher
github-org: openstack-infra

View File

@ -2636,6 +2636,8 @@ projects:
post:
- gerrit-package
- gerrit-package-buck
periodic:
- periodic-gerrit-plugin-javamelody-gerrit-plugin
- name: openstack-infra/gerrit-powered-agenda
check: