# 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'