Khai Do 335267250a deploy gerrit plugins into folder with plugin name
This change deploys built gerrit plugins into
http://tarballs.openstack.org/ci/gerrit/plugins/$PLUGIN_NAME
This will provide a known location to look for the plugin in downstream
obs so we can automate the download and installation of the plugin.

Change-Id: Icfcd9aa932313c0620ebeb5c8104771675d88db1
2014-04-29 16:52:53 -07:00

43 lines
1.3 KiB
YAML

- job-template:
name: 'periodic-gerrit-plugin-{name}'
node: '{node}'
wrappers:
- timeout:
timeout: 30
fail: true
- timestamps
builders:
- revoke-sudo
- 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/version-properties.sh
- inject:
properties-file: gerrit/plugins/{plugin-name}/version.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 ./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}-${{PROJECT_VER}}.jar'
target: 'tarballs/ci/gerrit/plugins/{plugin-name}'
- console-log
- job-group:
name: gerrit-plugin-jobs
jobs:
- 'periodic-gerrit-plugin-{name}'