2bd436f776
The build was failing because it was attempting to clone its-base plugin with the same branch as the gerrit core. This will typically work for upstream builds but since we have a fork of gerrit core (our own branch[1]) it doesn't work. This change lets us configure which branch to clone from, in this case just clone from the same branch[2] as the plugin. [1] http://git.openstack.org/cgit/openstack-infra/gerrit/log/?h=openstack/2.11.4 [2] https://gerrit.googlesource.com/plugins/its-base/+/stable-2.11 Change-Id: Ie20ef8f6e9f4500772bcc16f305c9c9e6466c44e
41 lines
1.5 KiB
YAML
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 {plugin-parent-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
|