c2edc2a1f0
Make the Gerrit plugin job names a little more concise and make the job a little more generic so that users can reuse it to build other gerrit plugins. Change-Id: Icfba74619b1dff65999882ad9f15d7c0fdb4c666
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
- job-template:
|
|
name: '{plugin-name}-gerrit-plugin-{plugin-branch}'
|
|
node: '{node}'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 30
|
|
- timestamps
|
|
|
|
builders:
|
|
- revoke-sudo
|
|
- install-buck
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
export PATH=`pwd`/buck/bin:$PATH
|
|
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/version-properties.sh
|
|
source version.properties
|
|
cd $WORKSPACE/gerrit
|
|
buck clean
|
|
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
|