project-config/jenkins/jobs/gerrit-plugin-jobs.yaml
Khai Do 99b1692130 Add a build for the gerrit its-storyboard plugin
The its-storyboard plugin will allows us to integrate gerrit with
storyboard.  Add a build for the gerrit its-storyboard plugin[1].
Building this plugin also requires building the its-base plugin[2]
because the its-storyboard depends on its-base.  Refactored the build
job to build a parent project if it's defined in the project yaml.

[1] https://gerrit.googlesource.com/plugins/its-storyboard
[2] https://gerrit.googlesource.com/plugins/its-base

Change-Id: I7b8461bb47ba902158531a64ddf88a9bb2b03312
2016-06-16 14:48:32 -07:00

41 lines
1.5 KiB
YAML

- job-template:
name: '{plugin-name}-gerrit-plugin-{plugin-branch}'
node: ubuntu-trusty
wrappers:
- build-timeout:
timeout: 30
- timestamps
builders:
- install-distro-packages
- revoke-sudo
- install-buck
- shell: |
#!/bin/bash -xe
export PATH=`pwd`/buck/bin:$PATH
rm -rf gerrit
git clone -b {gerrit-branch} {gerrit-project}
PLUGIN_PARENT_PROJECT={plugin-parent-project}
if [ -n "$PLUGIN_PARENT_PROJECT" ]; then
git clone -b {gerrit-branch} {plugin-parent-project} gerrit/plugins/{plugin-parent-name}
fi
git clone -b {plugin-branch} {plugin-project} gerrit/plugins/{plugin-name}
cd gerrit/plugins/{plugin-name}
/usr/local/jenkins/slave_scripts/version-properties.sh
source version.properties
cd $WORKSPACE/gerrit
buck clean
if [ -n "$PLUGIN_PARENT_PROJECT" ]; then
buck build plugins/{plugin-parent-name}:{plugin-parent-name}
fi
buck build plugins/{plugin-name}:{plugin-name}
cp ./buck-out/gen/plugins/{plugin-name}/{plugin-name}.jar ./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}-*.jar'
target: 'tarballs/ci/gerrit/plugins/{plugin-name}'
- console-log