system-config/modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml
Khai Do 384b5472e2 deploy jenkins plugin pom.xml file.
This is a fix for bug 1208901.

  *modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml
     - move more details into jenkinsci-upload.sh

  *modules/jenkins/files/slave_scripts/maven-upload.sh
     - renamed to jenkinsci-upload.sh

  *modules/jenkins/files/slave_scripts/jenkinsci-upload.sh
     - created a versioned pom.xml file
     - deploy both hpi and pom file to repo.jenkins-ci.org

Change-Id: I6564e3ade04f3675ab7c269f26b8906385b5041f
2013-08-06 15:37:07 -07:00

92 lines
2.3 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_HPI="{name}-$TAG.hpi"
# copy plugin artifacts from tarballs to local workspace
rm -rf *.hpi
curl -o $FILENAME_HPI http://{tarball-site}/ci/{name}/$FILENAME_HPI
# deploy to maven repository
FILENAME_POM="{name}-$TAG.pom"
/usr/local/jenkins/slave_scripts/jenkinsci-upload.sh {name} $TAG \
$FILENAME_POM $FILENAME_HPI
publishers:
- console-log
- job-group:
name: jenkins-plugin-jobs
jobs:
- 'gate-{name}-build'
- '{name}-hpi-artifact'
- '{name}-jenkinsci-upload'