system-config/modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml
James E. Blair f7f2760fe0 Set the Zuul/Jenkins base log URL in a function
And use that when constructing log paths and URLs.  Use a substr
of the change id or commit sha when constructing URLs so the log
directories are deeper.

Make copying the test results a macro (it's used in several places).

Update the gearman log client to take advantage of the new parameter.

Requires https://review.openstack.org/#/c/36304/

Change-Id: I64faa35eddc4105271efa3de4f83b608b77655c2
2013-07-19 10:36:31 -07:00

92 lines
2.4 KiB
YAML

# need to run gerrit-git-prep in maven-properties.sh script to work
# around jenkins bug: https://issues.jenkins-ci.org/browse/JENKINS-14193
- job-template:
name: 'gate-{name}-build'
project-type: maven
node: precise
wrappers:
- timeout:
timeout: 30
fail: true
- timestamps
- inject:
script-file: /usr/local/jenkins/slave_scripts/maven-properties.sh
- inject:
properties-file: maven.properties
maven:
maven-name: Maven3
root-module:
group-id: '{maven-group-id}'
artifact-id: '{name}'
root-pom: pom.xml
goals: 'clean package -Dproject-version=${{PROJECT_VER}}'
publishers:
- console-log
- job-template:
name: '{name}-hpi-artifact'
project-type: maven
node: precise
wrappers:
- timeout:
timeout: 30
fail: true
- timestamps
- inject:
script-file: /usr/local/jenkins/slave_scripts/maven-properties.sh
- inject:
properties-file: maven.properties
maven:
maven-name: Maven3
root-module:
group-id: '{maven-group-id}'
artifact-id: '{name}'
root-pom: pom.xml
goals: 'clean package -Dmaven.test.skip=true -Dproject-version=${{PROJECT_VER}}'
postbuilders:
- shell: |
cp ./target/{name}.hpi ./target/{name}-$PROJECT_VER.hpi
publishers:
- war:
site: 'tarballs.openstack.org'
warfile: 'target/{name}-${{PROJECT_VER}}.hpi'
target: 'tarballs/ci/{name}'
- console-log
- job-template:
name: '{name}-jenkinsci-upload'
node: pypi
builders:
- shell: |
#!/bin/bash -xe
TAG=`echo $ZUUL_REF | sed 's/^refs.tags.//'`
FILENAME="{name}-$TAG.hpi"
# copy plugin plugin artifacts from tarballs to local workspace
rm -rf *.hpi
curl -o $FILENAME http://{tarball-site}/ci/{name}/$FILENAME
# deploy plugin artifacts from workspace to repo.jenkins-ci.org
JENKINSCI_REPO="http://repo.jenkins-ci.org/list/releases/org/jenkins-ci/plugins"
JENKINSCI_REPO_CREDS="/home/jenkins/.jenkinsci-curl"
/usr/local/jenkins/slave_scripts/maven-upload.sh {name} $JENKINSCI_REPO $JENKINSCI_REPO_CREDS
publishers:
- console-log
- job-group:
name: jenkins-plugin-jobs
jobs:
- 'gate-{name}-build'
- '{name}-hpi-artifact'
- '{name}-jenkinsci-upload'