system-config/modules/openstack_project/files/jenkins_job_builder/config/gerrit-plugin-jobs.yaml
Khai Do 328410931c fix gerrit plugin build job
fixed reference to the built artifact for the copy command.

Change-Id: I39fb239fda98e2f904f150b94d480d022889b383
2014-04-03 10:24:28 -07:00

43 lines
1.2 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/{name}'
- console-log
- job-group:
name: gerrit-plugin-jobs
jobs:
- 'periodic-gerrit-plugin-{name}'