Setup tooling and jobs for openstack Gerrit ver 2.8 and beyond
Previous versions of Gerrit used maven as the build tool, it has since switched to use buck. I believe the switch happened in ver 2.7. We are now hosting a fork of Gerrit ver 2.8 so we need to setup tooling and jobs to build newer versions of gerrit. This patch sets up tooling and jobs required for building the openstack Gerrit ver 2.8. We now have two sets of jenkins jobs to build gerrit, one for Gerrit prior to ver 2.4.x (maven) and one for Gerrit post ver 2.7 (buck). Notes: 1. Buck does not have OS packages for easy installation so it needs to be built from source using ant (requires gcc as well). 2. Maven jobs execute only when commits are made to 2.4.x branch. 3. Buck jobs execute when commits are made to branches other than 2.4.x 4. The origin post job 'gerrit-package' now publishes artifacts to tarballs.o.o/ci/gerrit instead of tarballs.o.o/ci 5. Buck requires the zip package to build gerrit. 6. Buck and gerrit clones need to be at same directory level Partial-Bug: #1082781 Change-Id: I1de9f127fa6826fb0a686d12dc77c0edff34be7c
This commit is contained in:
parent
5c3142f062
commit
c3e2997ef8
@ -11,6 +11,7 @@ class jenkins::params {
|
||||
$ccache_package = 'ccache'
|
||||
$python_netaddr_package = 'python-netaddr'
|
||||
# packages needed by slaves
|
||||
$ant_package = 'ant'
|
||||
$asciidoc_package = 'asciidoc'
|
||||
$curl_package = 'curl'
|
||||
$docbook_xml_package = 'docbook-style-xsl'
|
||||
@ -48,6 +49,7 @@ class jenkins::params {
|
||||
$sbcl_package = 'sbcl'
|
||||
$sqlite_package = 'sqlite'
|
||||
$unzip_package = 'unzip'
|
||||
$zip_package = 'zip'
|
||||
$xslt_package = 'libxslt'
|
||||
$xvfb_package = 'xorg-x11-server-Xvfb'
|
||||
# For Tooz unit tests
|
||||
@ -84,6 +86,7 @@ class jenkins::params {
|
||||
$ccache_package = 'ccache'
|
||||
$python_netaddr_package = 'python-netaddr'
|
||||
# packages needed by slaves
|
||||
$ant_package = 'ant'
|
||||
$asciidoc_package = 'asciidoc'
|
||||
$curl_package = 'curl'
|
||||
$docbook_xml_package = 'docbook-xml'
|
||||
@ -124,6 +127,7 @@ class jenkins::params {
|
||||
$sbcl_package = 'sbcl'
|
||||
$sqlite_package = 'sqlite3'
|
||||
$unzip_package = 'unzip'
|
||||
$zip_package = 'zip'
|
||||
$xslt_package = 'xsltproc'
|
||||
$xvfb_package = 'xvfb'
|
||||
# For [tooz, taskflow, nova] using zookeeper in unit tests
|
||||
|
@ -29,6 +29,7 @@ class jenkins::slave(
|
||||
|
||||
# Packages that most jenkins slaves (eg, unit test runners) need
|
||||
$standard_packages = [
|
||||
$::jenkins::params::ant_package, # for building buck
|
||||
$::jenkins::params::asciidoc_package, # for building gerrit/building openstack docs
|
||||
$::jenkins::params::curl_package,
|
||||
$::jenkins::params::docbook_xml_package, # for building openstack docs
|
||||
@ -61,6 +62,7 @@ class jenkins::slave(
|
||||
$::jenkins::params::sbcl_package, # cl-openstack-client testing
|
||||
$::jenkins::params::sqlite_package,
|
||||
$::jenkins::params::unzip_package,
|
||||
$::jenkins::params::zip_package,
|
||||
$::jenkins::params::xslt_package, # for building openstack docs
|
||||
$::jenkins::params::xvfb_package, # for selenium tests
|
||||
]
|
||||
|
@ -88,5 +88,127 @@
|
||||
- war:
|
||||
site: 'tarballs.openstack.org'
|
||||
warfile: 'gerrit-war/target/gerrit*.war'
|
||||
target: 'tarballs/ci/'
|
||||
target: 'tarballs/ci/gerrit'
|
||||
- console-log
|
||||
|
||||
- job:
|
||||
name: check-gerrit-buck
|
||||
node: precise
|
||||
|
||||
wrappers:
|
||||
- timeout:
|
||||
timeout: 40
|
||||
fail: true
|
||||
- timestamps
|
||||
|
||||
builders:
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
if [[ ! -d "gerrit"]]
|
||||
then
|
||||
mkdir gerrit
|
||||
fi
|
||||
cd gerrit
|
||||
/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org http://zuul.openstack.org git://git.openstack.org
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
cd gerrit
|
||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
||||
- inject:
|
||||
properties-file: gerrit/maven.properties
|
||||
- install-buck
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
export PATH=`pwd`/buck/bin:$PATH
|
||||
cd gerrit
|
||||
buck clean
|
||||
buck build release
|
||||
buck test --all
|
||||
- shell: "cp gerrit/buck-out/gen/release.war gerrit/buck-out/gen/gerrit-$PROJECT_VER.war"
|
||||
|
||||
publishers:
|
||||
- war:
|
||||
site: 'tarballs.openstack.org'
|
||||
warfile: 'gerrit/buck-out/gen/gerrit-${{PROJECT_VER}}.war'
|
||||
target: 'tarballs/ci/test'
|
||||
- console-log
|
||||
|
||||
- job:
|
||||
name: gate-gerrit-buck
|
||||
node: precise
|
||||
|
||||
wrappers:
|
||||
- timeout:
|
||||
timeout: 40
|
||||
fail: true
|
||||
- timestamps
|
||||
|
||||
builders:
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
if [[ ! -d "gerrit"]]
|
||||
then
|
||||
mkdir gerrit
|
||||
fi
|
||||
cd gerrit
|
||||
/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org http://zuul.openstack.org git://git.openstack.org
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
cd gerrit
|
||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
||||
- inject:
|
||||
properties-file: gerrit/maven.properties
|
||||
- install-buck
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
export PATH=`pwd`/buck/bin:$PATH
|
||||
cd gerrit
|
||||
buck clean
|
||||
buck build release
|
||||
buck test --all
|
||||
- shell: "cp gerrit/buck-out/gen/release.war gerrit/buck-out/gen/gerrit-$PROJECT_VER.war"
|
||||
|
||||
publishers:
|
||||
- console-log
|
||||
|
||||
- job:
|
||||
name: gerrit-package-buck
|
||||
node: precise
|
||||
|
||||
wrappers:
|
||||
- timeout:
|
||||
timeout: 40
|
||||
fail: true
|
||||
- timestamps
|
||||
|
||||
builders:
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
if [[ ! -d "gerrit"]]
|
||||
then
|
||||
mkdir gerrit
|
||||
fi
|
||||
cd gerrit
|
||||
/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org http://zuul.openstack.org git://git.openstack.org
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
cd gerrit
|
||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
||||
- inject:
|
||||
properties-file: gerrit/maven.properties
|
||||
- install-buck
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
export PATH=`pwd`/buck/bin:$PATH
|
||||
cd gerrit
|
||||
buck clean
|
||||
buck build release
|
||||
buck test --all
|
||||
- shell: "cp gerrit/buck-out/gen/release.war gerrit/buck-out/gen/gerrit-$PROJECT_VER.war"
|
||||
|
||||
publishers:
|
||||
- war:
|
||||
site: 'tarballs.openstack.org'
|
||||
warfile: 'gerrit/buck-out/gen/gerrit-${{PROJECT_VER}}.war'
|
||||
target: 'tarballs/ci/gerrit'
|
||||
- console-log
|
||||
|
@ -240,6 +240,18 @@
|
||||
find /home/jenkins/pypimirror/mirror/ \( -name index.html -or -name full.html \) -delete
|
||||
rsync -a --ignore-existing --itemize-changes /home/jenkins/pypimirror/mirror/ jenkins@static.openstack.org:/srv/static/pypi/
|
||||
|
||||
- builder:
|
||||
name: install-buck
|
||||
builders:
|
||||
- shell: |
|
||||
if [[ ! -d "buck"]]
|
||||
then
|
||||
git clone https://gerrit.googlesource.com/buck
|
||||
cd buck
|
||||
git checkout 274acb17e9b6dc9ee60bc1371c47a7f49640c24c
|
||||
ant
|
||||
fi
|
||||
|
||||
|
||||
# ======================================================================
|
||||
|
||||
|
@ -307,10 +307,14 @@ jobs:
|
||||
voting: false
|
||||
- name: check-tempest-dsvm-cells-full
|
||||
voting: false
|
||||
# For Gerrit ver 2.4.x (using maven)
|
||||
- name: ^(gate|check)-gerrit-unittests$
|
||||
branch: ^openstack/.*$
|
||||
branch: ^openstack/2\.4.*$
|
||||
- name: gerrit-package
|
||||
branch: ^openstack/.*$
|
||||
branch: ^openstack/2\.4.*$
|
||||
# For Gerrit ver 2.8.x and later (using buck)
|
||||
- name: ^.*gerrit.*buck$
|
||||
branch: ^openstack/(?!2\.4).*$
|
||||
- name: gate-nova-pylint
|
||||
voting: false
|
||||
- name: gate-cinder-pylint
|
||||
@ -2531,10 +2535,13 @@ projects:
|
||||
- name: openstack-infra/gerrit
|
||||
check:
|
||||
- check-gerrit-unittests
|
||||
- check-gerrit-buck
|
||||
gate:
|
||||
- gate-gerrit-unittests
|
||||
- gate-gerrit-buck
|
||||
post:
|
||||
- gerrit-package
|
||||
- gerrit-package-buck
|
||||
|
||||
- name: openstack-infra/gerritbot
|
||||
check:
|
||||
|
Loading…
x
Reference in New Issue
Block a user