Jenkins Job builder 2.0
This uses a python script with modules for parts of the XML. The parameters for the projects are provided using YAML scripts. It also includes a Jenkins API module to directly inject jobs into Jenkins without requiring a restart/reload as well as a memory of which jobs have been pushed to Jenkins. It is currently configured to replace the original Jenkins Jobs in StackForge. What it won't yet do: 1. Delete jobs (although it isn't far off being able to) 2. check-* jobs (need to modify the trigger_gerrit module to support that) Documentation to follow Fixes bug #995599 Change-Id: I2a67ee2d9e8f43cbced56425ef7f80dc6a30a814
This commit is contained in:
parent
813c033198
commit
c3db5b210a
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.pyc
|
@ -187,10 +187,6 @@ node "jenkins.openstack.org" {
|
|||||||
ssl_key_file => '/etc/ssl/private/jenkins.openstack.org.key',
|
ssl_key_file => '/etc/ssl/private/jenkins.openstack.org.key',
|
||||||
ssl_chain_file => '/etc/ssl/certs/intermediate.pem',
|
ssl_chain_file => '/etc/ssl/certs/intermediate.pem',
|
||||||
}
|
}
|
||||||
class { "jenkins_jobs":
|
|
||||||
site => "openstack",
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
node "jenkins-dev.openstack.org" {
|
node "jenkins-dev.openstack.org" {
|
||||||
|
@ -70,26 +70,7 @@ node "jenkins.stackforge.org" {
|
|||||||
|
|
||||||
class { "jenkins_jobs":
|
class { "jenkins_jobs":
|
||||||
site => "stackforge",
|
site => "stackforge",
|
||||||
}
|
projects => ['reddwarf', 'ceilometer']
|
||||||
|
|
||||||
jenkins_jobs::python_jobs { "reddwarf-natty":
|
|
||||||
site => "stackforge",
|
|
||||||
project => "reddwarf",
|
|
||||||
node_group => "natty",
|
|
||||||
ensure => "disabled"
|
|
||||||
}
|
|
||||||
|
|
||||||
jenkins_jobs::generic_jobs { "reddwarf":
|
|
||||||
site => "stackforge",
|
|
||||||
project => "reddwarf",
|
|
||||||
node_group => "oneiric"
|
|
||||||
}
|
|
||||||
|
|
||||||
jenkins_jobs::jobs::merge_gate { "ceilometer":
|
|
||||||
site => "stackforge",
|
|
||||||
project => "ceilometer",
|
|
||||||
node_group => "oneiric",
|
|
||||||
trigger_branches => [["ceilometer", '**']]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
173
modules/jenkins_jobs/files/jenkins_jobs.py
Normal file
173
modules/jenkins_jobs/files/jenkins_jobs.py
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Manage jobs in Jenkins server
|
||||||
|
|
||||||
|
import os
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import yaml
|
||||||
|
import sys
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
import pycurl
|
||||||
|
import jenkins_talker
|
||||||
|
import ConfigParser
|
||||||
|
from xml.dom.ext import PrettyPrint
|
||||||
|
from StringIO import StringIO
|
||||||
|
from xml.dom.ext.reader import Sax2
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
subparser = parser.add_subparsers(help='update or delete job', dest='command')
|
||||||
|
parser_update = subparser.add_parser('update')
|
||||||
|
parser_update.add_argument('file', help='YAML file for update', type=file)
|
||||||
|
parser_delete = subparser.add_parser('delete')
|
||||||
|
parser_delete.add_argument('name', help='name of job')
|
||||||
|
parser.add_argument('--conf', dest='conf', help='Configuration file')
|
||||||
|
options = parser.parse_args()
|
||||||
|
|
||||||
|
if options.conf:
|
||||||
|
conf = options.conf
|
||||||
|
else:
|
||||||
|
conf = 'jenkins_jobs.ini'
|
||||||
|
|
||||||
|
conffp = open(conf, 'r')
|
||||||
|
config = ConfigParser.ConfigParser()
|
||||||
|
config.readfp(conffp)
|
||||||
|
|
||||||
|
class YamlParser(object):
|
||||||
|
def __init__(self, yfile):
|
||||||
|
self.data = yaml.load_all(yfile)
|
||||||
|
self.it = self.data.__iter__()
|
||||||
|
self.current = ''
|
||||||
|
|
||||||
|
def get_next_xml(self):
|
||||||
|
self.current = self.it.next()
|
||||||
|
return XmlParser(self.current)
|
||||||
|
|
||||||
|
def get_name(self):
|
||||||
|
return self.current['main']['name']
|
||||||
|
|
||||||
|
|
||||||
|
class XmlParser(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
self.xml = XML.Element('project')
|
||||||
|
self.modules = []
|
||||||
|
self._load_modules()
|
||||||
|
self._build()
|
||||||
|
|
||||||
|
def _load_modules(self):
|
||||||
|
for modulename in self.data['modules']:
|
||||||
|
modulename = 'modules.{name}'.format(name=modulename)
|
||||||
|
self._register_module(modulename)
|
||||||
|
|
||||||
|
def _register_module(self, modulename):
|
||||||
|
classname = modulename.rsplit('.', 1)[1]
|
||||||
|
module = __import__(modulename, fromlist=[classname])
|
||||||
|
cla = getattr(module, classname)
|
||||||
|
self.modules.append(cla(self.data))
|
||||||
|
|
||||||
|
def _build(self):
|
||||||
|
XML.SubElement(self.xml, 'actions')
|
||||||
|
description = XML.SubElement(self.xml, 'description')
|
||||||
|
description.text = "THIS JOB IS MANAGED BY PUPPET AND WILL BE OVERWRITTEN.\n\n\
|
||||||
|
DON'T EDIT THIS JOB THROUGH THE WEB\n\n\
|
||||||
|
If you would like to make changes to this job, please see:\n\n\
|
||||||
|
https://github.com/openstack/openstack-ci-puppet\n\n\
|
||||||
|
In modules/jenkins_jobs"
|
||||||
|
XML.SubElement(self.xml, 'keepDependencies').text = 'false'
|
||||||
|
XML.SubElement(self.xml, 'disabled').text = self.data['main']['disabled']
|
||||||
|
XML.SubElement(self.xml, 'blockBuildWhenDownstreamBuilding').text = 'false'
|
||||||
|
XML.SubElement(self.xml, 'blockBuildWhenUpstreamBuilding').text = 'false'
|
||||||
|
XML.SubElement(self.xml, 'concurrentBuild').text = 'false'
|
||||||
|
XML.SubElement(self.xml, 'buildWrappers')
|
||||||
|
self._insert_modules()
|
||||||
|
|
||||||
|
def _insert_modules(self):
|
||||||
|
for module in self.modules:
|
||||||
|
module.gen_xml(self.xml)
|
||||||
|
|
||||||
|
def md5(self):
|
||||||
|
return hashlib.md5(self.output()).hexdigest()
|
||||||
|
|
||||||
|
def output(self):
|
||||||
|
reader = Sax2.Reader()
|
||||||
|
docNode = reader.fromString(XML.tostring(self.xml))
|
||||||
|
tmpStream = StringIO()
|
||||||
|
PrettyPrint(docNode, stream=tmpStream)
|
||||||
|
return tmpStream.getvalue()
|
||||||
|
|
||||||
|
class CacheStorage(object):
|
||||||
|
def __init__(self):
|
||||||
|
self.cachefilename = os.path.expanduser('~/.jenkins_jobs_cache.yml')
|
||||||
|
try:
|
||||||
|
yfile = file(self.cachefilename, 'r')
|
||||||
|
except IOError:
|
||||||
|
self.data = {}
|
||||||
|
return
|
||||||
|
self.data = yaml.load(yfile)
|
||||||
|
yfile.close()
|
||||||
|
|
||||||
|
def set(self, job, md5):
|
||||||
|
self.data[job] = md5
|
||||||
|
yfile = file(self.cachefilename, 'w')
|
||||||
|
yaml.dump(self.data, yfile)
|
||||||
|
yfile.close()
|
||||||
|
|
||||||
|
def is_cached(self, job):
|
||||||
|
if self.data.has_key(job):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
def has_changed(self, job, md5):
|
||||||
|
if self.data.has_key(job) and self.data[job] == md5:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
class Jenkins(object):
|
||||||
|
def __init__(self, url, user, password):
|
||||||
|
self.jenkins = jenkins_talker.JenkinsTalker(url, user, password)
|
||||||
|
|
||||||
|
def update_job(self, job_name, xml):
|
||||||
|
if self.jenkins.is_job(job_name):
|
||||||
|
self.jenkins.update_job(job_name, xml)
|
||||||
|
else:
|
||||||
|
self.jenkins.create_job(job_name, xml)
|
||||||
|
|
||||||
|
def is_job(self, job_name):
|
||||||
|
return self.jenkins.is_job(job_name)
|
||||||
|
|
||||||
|
def get_job_md5(self, job_name):
|
||||||
|
xml = self.jenkins.get_job_config(job_name)
|
||||||
|
return hashlib.md5(xml).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
yparse = YamlParser(options.file)
|
||||||
|
cache = CacheStorage()
|
||||||
|
remote_jenkins = Jenkins(config.get('jenkins','url'), config.get('jenkins','user'), config.get('jenkins','password'))
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
xml = yparse.get_next_xml()
|
||||||
|
job = yparse.get_name()
|
||||||
|
md5 = xml.md5()
|
||||||
|
if remote_jenkins.is_job(job) and not cache.is_cached(job):
|
||||||
|
old_md5 = remote_jenkins.get_job_md5(job)
|
||||||
|
cache.set(job, old_md5)
|
||||||
|
|
||||||
|
if cache.has_changed(job, md5):
|
||||||
|
remote_jenkins.update_job(job, xml.output())
|
||||||
|
cache.set(job, md5)
|
||||||
|
except StopIteration:
|
||||||
|
break
|
83
modules/jenkins_jobs/files/jenkins_talker.py
Normal file
83
modules/jenkins_jobs/files/jenkins_talker.py
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# A basic API class to talk to a Jenkins Server
|
||||||
|
|
||||||
|
import pycurl
|
||||||
|
from StringIO import StringIO
|
||||||
|
|
||||||
|
class JenkinsTalkerException(Exception): pass
|
||||||
|
|
||||||
|
class JenkinsTalker(object):
|
||||||
|
def __init__(self, url, user, password):
|
||||||
|
self.url = url
|
||||||
|
self.user = user
|
||||||
|
self.password = password
|
||||||
|
|
||||||
|
def _post_xml(self, path, xml, pass_codes):
|
||||||
|
curl = pycurl.Curl()
|
||||||
|
response = StringIO()
|
||||||
|
curl.setopt(pycurl.URL, self.url + path)
|
||||||
|
curl.setopt(pycurl.USERPWD, self.user + ":" + self.password)
|
||||||
|
curl.setopt(pycurl.POST, 1)
|
||||||
|
curl.setopt(pycurl.POSTFIELDS, xml)
|
||||||
|
curl.setopt(pycurl.HTTPHEADER, [ "Content-Type: text/xml" ])
|
||||||
|
curl.setopt(pycurl.POSTFIELDSIZE, len(xml))
|
||||||
|
# should probably shove this response into a debug output somewhere
|
||||||
|
curl.setopt(pycurl.WRITEFUNCTION, response.write)
|
||||||
|
curl.perform()
|
||||||
|
if curl.getinfo(pycurl.RESPONSE_CODE) not in pass_codes:
|
||||||
|
raise JenkinsTalkerException('error posting XML')
|
||||||
|
curl.close()
|
||||||
|
|
||||||
|
def _get_request(self, path, pass_codes):
|
||||||
|
curl = pycurl.Curl()
|
||||||
|
response = StringIO()
|
||||||
|
curl.setopt(pycurl.URL, self.url + path)
|
||||||
|
curl.setopt(pycurl.USERPWD, self.user + ":" + self.password)
|
||||||
|
curl.setopt(pycurl.WRITEFUNCTION, response.write)
|
||||||
|
curl.perform()
|
||||||
|
if curl.getinfo(pycurl.RESPONSE_CODE) not in pass_codes:
|
||||||
|
raise JenkinsTalkerException('error getting response')
|
||||||
|
curl.close()
|
||||||
|
return response.getvalue()
|
||||||
|
|
||||||
|
def create_job(self, job_name, xml):
|
||||||
|
path = 'createItem?name=' + job_name
|
||||||
|
pass_codes = [ 200 ]
|
||||||
|
self._post_xml(path, xml, pass_codes)
|
||||||
|
|
||||||
|
def update_job(self, job_name, xml):
|
||||||
|
path = 'job/' + job_name + '/config.xml'
|
||||||
|
pass_codes = [ 200 ]
|
||||||
|
self._post_xml(path, xml, pass_codes)
|
||||||
|
|
||||||
|
def delete_job(self, job_name):
|
||||||
|
path = 'job/' + job_name + '/doDelete'
|
||||||
|
pass_codes = [ 302 ]
|
||||||
|
self._get_request(path, pass_codes)
|
||||||
|
|
||||||
|
def get_job_config(self, job_name):
|
||||||
|
path = 'job/' + job_name + '/config.xml'
|
||||||
|
pass_codes = [ 200 ]
|
||||||
|
return self._get_request(path, pass_codes)
|
||||||
|
|
||||||
|
def is_job(self, job_name):
|
||||||
|
try:
|
||||||
|
self.get_job_config(job_name)
|
||||||
|
except JenkinsTalkerException:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
0
modules/jenkins_jobs/files/modules/__init__.py
Normal file
0
modules/jenkins_jobs/files/modules/__init__.py
Normal file
31
modules/jenkins_jobs/files/modules/assignednode.py
Normal file
31
modules/jenkins_jobs/files/modules/assignednode.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for assigned nodes
|
||||||
|
# To use add the folowing into your YAML:
|
||||||
|
# assignednode:
|
||||||
|
# - node: 'oneiric'
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class assignednode(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
node = self.data['assignednode']['node']
|
||||||
|
XML.SubElement(xml_parent, 'assignedNode').text = node
|
||||||
|
XML.SubElement(xml_parent, 'canRoam').text = 'false'
|
||||||
|
|
83
modules/jenkins_jobs/files/modules/builders.py
Normal file
83
modules/jenkins_jobs/files/modules/builders.py
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for builders
|
||||||
|
# To use add the folowing into your YAML:
|
||||||
|
# builders:
|
||||||
|
# - 'gerrit_git_prep'
|
||||||
|
# - 'python26'
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class builders(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
builders = XML.SubElement(xml_parent, 'builders')
|
||||||
|
for builder in self.data['builders']:
|
||||||
|
getattr(self, '_' + builder)(builders)
|
||||||
|
|
||||||
|
def _add_script(self, xml_parent, script):
|
||||||
|
shell = XML.SubElement(xml_parent, 'hudson.tasks.Shell')
|
||||||
|
XML.SubElement(shell, 'command').text = script
|
||||||
|
|
||||||
|
def _copy_bundle(self, xml_parent):
|
||||||
|
copy = XML.SubElement(xml_parent, 'hudson.plugins.copyartifact.CopyArtifact')
|
||||||
|
XML.SubElement(copy, 'projectName').text = '$PROJECT-venv'
|
||||||
|
XML.SubElement(copy, 'filter')
|
||||||
|
XML.SubElement(copy, 'target')
|
||||||
|
XML.SubElement(copy, 'selector', {'class':'hudson.plugins.copyartifact.StatusBuildSelector'})
|
||||||
|
self._add_script(xml_parent, '/usr/local/jenkins/slave_scripts/copy-bundle.sh')
|
||||||
|
|
||||||
|
def _coverage(self, xml_parent):
|
||||||
|
self._add_script(xml_parent, '/usr/local/jenkins/slave_scripts/run-cover.sh')
|
||||||
|
|
||||||
|
def _docs(self, xml_parent):
|
||||||
|
self._add_script(xml_parent, '/usr/local/jenkins/slave_scripts/run-docs.sh')
|
||||||
|
|
||||||
|
def _gerrit_git_prep(self, xml_parent):
|
||||||
|
self._add_script(xml_parent, '/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh {site}'.format(site=self.data['main']['site']))
|
||||||
|
|
||||||
|
def _pep8(self, xml_parent):
|
||||||
|
self._add_script(xml_parent, 'tox -v -epep8 | tee pep8.txt')
|
||||||
|
|
||||||
|
def _python26(self, xml_parent):
|
||||||
|
self._add_script(xml_parent, '/usr/local/jenkins/slave_scripts/run-tox.sh 26')
|
||||||
|
|
||||||
|
def _python27(self, xml_parent):
|
||||||
|
self._add_script(xml_parent, '/usr/local/jenkins/slave_scripts/run-tox.sh 27')
|
||||||
|
|
||||||
|
def _tarball(self, xml_parent):
|
||||||
|
self._add_script(xml_parent, '/usr/local/jenkins/slave_scripts/create-tarball.sh')
|
||||||
|
|
||||||
|
def _venv(self, xml_parent):
|
||||||
|
self._add_script(xml_parent, '/usr/local/jenkins/slave_scripts/build-bundle.sh')
|
||||||
|
|
||||||
|
def _ppa(self, xml_parent):
|
||||||
|
self._add_script(xml_parent, 'rm -rf build dist.zip\n\
|
||||||
|
mkdir build')
|
||||||
|
copy = XML.SubElement(xml_parent, 'hudson.plugins.copyartifact.CopyArtifact')
|
||||||
|
XML.SubElement(copy, 'projectName').text = '$PROJECT-tarball'
|
||||||
|
XML.SubElement(copy, 'filter').text = 'dist/*.tar.gz'
|
||||||
|
XML.SubElement(copy, 'target').text = 'build'
|
||||||
|
selector = XML.SubElement(copy, 'selector', {'class':'hudson.plugins.copyartifact.StatusBuildSelector'})
|
||||||
|
XML.SubElement(selector, 'parameterName').text = 'BUILD_SELECTOR'
|
||||||
|
self._add_script(xml_parent, '#!/bin/bash\n\
|
||||||
|
\n\
|
||||||
|
#export DO_UPLOAD="no"\n\
|
||||||
|
export PROJECT="<%= project %>"\n\
|
||||||
|
export GERRIT_REFNAME=$BRANCH\n\
|
||||||
|
/usr/local/jenkins/slave_scripts/create-ppa-package.sh')
|
41
modules/jenkins_jobs/files/modules/logrotate.py
Normal file
41
modules/jenkins_jobs/files/modules/logrotate.py
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for logrotate
|
||||||
|
# To use add the folowing into your YAML:
|
||||||
|
# logrotate:
|
||||||
|
# daysToKeep: 3
|
||||||
|
# numToKeep: 20
|
||||||
|
# artifactDaysToKeep: -1
|
||||||
|
# artifactNumToKeep: -1
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class logrotate(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
if self.data.has_key('logrotate'):
|
||||||
|
lr_xml = XML.SubElement(xml_parent, 'logRotator')
|
||||||
|
logrotate = self.data['logrotate']
|
||||||
|
lr_days = XML.SubElement(lr_xml, 'daysToKeep')
|
||||||
|
lr_days.text = str(logrotate['daysToKeep'])
|
||||||
|
lr_num = XML.SubElement(lr_xml, 'numToKeep')
|
||||||
|
lr_num.text = str(logrotate['numToKeep'])
|
||||||
|
lr_adays = XML.SubElement(lr_xml, 'artifactDaysToKeep')
|
||||||
|
lr_adays.text = str(logrotate['artifactDaysToKeep'])
|
||||||
|
lr_anum = XML.SubElement(lr_xml, 'artifactNumToKeep')
|
||||||
|
lr_anum.text = str(logrotate['artifactNumToKeep'])
|
49
modules/jenkins_jobs/files/modules/properties.py
Normal file
49
modules/jenkins_jobs/files/modules/properties.py
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for job properties
|
||||||
|
# No additional YAML needed
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class properties(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
main = self.data['main']
|
||||||
|
properties = XML.SubElement(xml_parent, 'properties')
|
||||||
|
github = XML.SubElement(properties, 'com.coravy.hudson.plugins.github.GithubProjectProperty')
|
||||||
|
github_url = XML.SubElement(github, 'projectUrl')
|
||||||
|
github_url.text = "https://github.com/{site}/{project}".format(site=main['site'], project=main['project'])
|
||||||
|
throttle = XML.SubElement(properties, 'hudson.plugins.throttleconcurrents.ThrottleJobProperty')
|
||||||
|
XML.SubElement(throttle, 'maxConcurrentPerNode').text = '0'
|
||||||
|
XML.SubElement(throttle, 'maxConcurrentTotal').text = '0'
|
||||||
|
#XML.SubElement(throttle, 'categories')
|
||||||
|
XML.SubElement(throttle, 'throttleEnabled').text = 'false'
|
||||||
|
XML.SubElement(throttle, 'throttleOption').text = 'project'
|
||||||
|
XML.SubElement(throttle, 'configVersion').text = '1'
|
||||||
|
env = XML.SubElement(properties, 'EnvInjectJobProperty')
|
||||||
|
einfo = XML.SubElement(env, 'info')
|
||||||
|
eiproperties = XML.SubElement(einfo, 'propertiesContent')
|
||||||
|
eiproperties.text = 'PROJECT={project}'.format(project=main['project'])
|
||||||
|
XML.SubElement(einfo, 'loadFilesFromMaster').text = 'false'
|
||||||
|
XML.SubElement(env, 'on').text = 'true'
|
||||||
|
XML.SubElement(env, 'keepJenkinsSystemVariables').text = 'true'
|
||||||
|
XML.SubElement(env, 'keepBuildVariables').text = 'true'
|
||||||
|
XML.SubElement(env, 'contributors')
|
||||||
|
if main.has_key('authenticatedBuild') and main['authenticatedBuild'] == 'true':
|
||||||
|
security = XML.SubElement(properties, 'hudson.security.AuthorizationMatrixProperty')
|
||||||
|
XML.SubElement(security, 'permission').text = 'hudson.model.Item.Build:authenticated'
|
63
modules/jenkins_jobs/files/modules/publisher_coverage.py
Normal file
63
modules/jenkins_jobs/files/modules/publisher_coverage.py
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for coverage publishers
|
||||||
|
# No additional YAML needed
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class publisher_coverage(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
publishers = XML.SubElement(xml_parent, 'publishers')
|
||||||
|
cobertura = XML.SubElement(publishers, 'hudson.plugins.cobertura.CoberturaPublisher')
|
||||||
|
XML.SubElement(cobertura, 'coberturaReportFile').text = '**/coverage.xml'
|
||||||
|
XML.SubElement(cobertura, 'onlyStable').text = 'false'
|
||||||
|
healthy = XML.SubElement(cobertura, 'healthyTarget')
|
||||||
|
targets = XML.SubElement(healthy, 'targets', {'class':'enum-map','enum-type':'hudson.plugins.cobertura.targets.CoverageMetric'})
|
||||||
|
entry = XML.SubElement(targets, 'entry')
|
||||||
|
XML.SubElement(entry, 'hudson.plugins.cobertura.targets.CoverageMetric').text = 'CONDITIONAL'
|
||||||
|
XML.SubElement(entry, 'int').text = '70'
|
||||||
|
entry = XML.SubElement(targets, 'entry')
|
||||||
|
XML.SubElement(entry, 'hudson.plugins.cobertura.targets.CoverageMetric').text = 'LINE'
|
||||||
|
XML.SubElement(entry, 'int').text = '80'
|
||||||
|
entry = XML.SubElement(targets, 'entry')
|
||||||
|
XML.SubElement(entry, 'hudson.plugins.cobertura.targets.CoverageMetric').text = 'METHOD'
|
||||||
|
XML.SubElement(entry, 'int').text = '80'
|
||||||
|
unhealthy = XML.SubElement(cobertura, 'unhealthyTarget')
|
||||||
|
targets = XML.SubElement(unhealthy, 'targets', {'class':'enum-map','enum-type':'hudson.plugins.cobertura.targets.CoverageMetric'})
|
||||||
|
entry = XML.SubElement(targets, 'entry')
|
||||||
|
XML.SubElement(entry, 'hudson.plugins.cobertura.targets.CoverageMetric').text = 'CONDITIONAL'
|
||||||
|
XML.SubElement(entry, 'int').text = '0'
|
||||||
|
entry = XML.SubElement(targets, 'entry')
|
||||||
|
XML.SubElement(entry, 'hudson.plugins.cobertura.targets.CoverageMetric').text = 'LINE'
|
||||||
|
XML.SubElement(entry, 'int').text = '0'
|
||||||
|
entry = XML.SubElement(targets, 'entry')
|
||||||
|
XML.SubElement(entry, 'hudson.plugins.cobertura.targets.CoverageMetric').text = 'METHOD'
|
||||||
|
XML.SubElement(entry, 'int').text = '0'
|
||||||
|
failing = XML.SubElement(cobertura, 'failingTarget')
|
||||||
|
targets = XML.SubElement(failing, 'targets', {'class':'enum-map','enum-type':'hudson.plugins.cobertura.targets.CoverageMetric'})
|
||||||
|
entry = XML.SubElement(targets, 'entry')
|
||||||
|
XML.SubElement(entry, 'hudson.plugins.cobertura.targets.CoverageMetric').text = 'CONDITIONAL'
|
||||||
|
XML.SubElement(entry, 'int').text = '0'
|
||||||
|
entry = XML.SubElement(targets, 'entry')
|
||||||
|
XML.SubElement(entry, 'hudson.plugins.cobertura.targets.CoverageMetric').text = 'LINE'
|
||||||
|
XML.SubElement(entry, 'int').text = '0'
|
||||||
|
entry = XML.SubElement(targets, 'entry')
|
||||||
|
XML.SubElement(entry, 'hudson.plugins.cobertura.targets.CoverageMetric').text = 'METHOD'
|
||||||
|
XML.SubElement(entry, 'int').text = '0'
|
||||||
|
XML.SubElement(cobertura, 'sourceEncoding').text = 'ASCII'
|
43
modules/jenkins_jobs/files/modules/publisher_docs.py
Normal file
43
modules/jenkins_jobs/files/modules/publisher_docs.py
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for docs publishers
|
||||||
|
# No additional YAML needed
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class publisher_docs(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
main = self.data['main']
|
||||||
|
publishers = XML.SubElement(xml_parent, 'publishers')
|
||||||
|
scp = XML.SubElement(publishers, 'be.certipost.hudson.plugin.SCPRepositoryPublisher')
|
||||||
|
XML.SubElement(scp, 'siteName').text = '{proj}.{site}.org'.format(proj=main['project'], site=main['site'])
|
||||||
|
entries = XML.SubElement(scp, 'entries')
|
||||||
|
entry = XML.SubElement(entries, 'be.certipost.hudson.plugin.Entry')
|
||||||
|
XML.SubElement(entry, 'filePath').text = 'docs/{proj}'.format(proj=main['project'])
|
||||||
|
XML.SubElement(entry, 'sourceFile').text = 'doc/build/html/**'
|
||||||
|
XML.SubElement(entry, 'keepHierarchy').text = 'false'
|
||||||
|
entry = XML.SubElement(entries, 'be.certipost.hudson.plugin.Entry')
|
||||||
|
XML.SubElement(entry, 'filePath').text = 'docs/{proj}/_static'.format(proj=main['project'])
|
||||||
|
XML.SubElement(entry, 'sourceFile').text = 'doc/build/html/_static/**'
|
||||||
|
XML.SubElement(entry, 'keepHierarchy').text = 'false'
|
||||||
|
entry = XML.SubElement(entries, 'be.certipost.hudson.plugin.Entry')
|
||||||
|
XML.SubElement(entry, 'filePath').text = 'docs/{proj}/_sources'.format(proj=main['project'])
|
||||||
|
XML.SubElement(entry, 'sourceFile').text = 'doc/build/html/_sources/**'
|
||||||
|
XML.SubElement(entry, 'keepHierarchy').text = 'false'
|
||||||
|
|
26
modules/jenkins_jobs/files/modules/publisher_none.py
Normal file
26
modules/jenkins_jobs/files/modules/publisher_none.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for no publishers
|
||||||
|
# No additional YAML needed
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class publisher_none(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
XML.SubElement(xml_parent, 'publishers')
|
74
modules/jenkins_jobs/files/modules/publisher_pep8.py
Normal file
74
modules/jenkins_jobs/files/modules/publisher_pep8.py
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for pep8 publishers
|
||||||
|
# No additional YAML needed
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class publisher_pep8(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def _add_entry(self, xml_parent, name):
|
||||||
|
entry = XML.SubElement(xml_parent, 'entry')
|
||||||
|
XML.SubElement(entry, 'string').text = name
|
||||||
|
tconfig = XML.SubElement(entry, 'hudson.plugins.violations.TypeConfig')
|
||||||
|
XML.SubElement(tconfig, 'type').text = name
|
||||||
|
XML.SubElement(tconfig, 'min').text = '10'
|
||||||
|
XML.SubElement(tconfig, 'max').text = '999'
|
||||||
|
XML.SubElement(tconfig, 'unstable').text = '999'
|
||||||
|
XML.SubElement(tconfig, 'usePattern').text = 'false'
|
||||||
|
XML.SubElement(tconfig, 'pattern')
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
publishers = XML.SubElement(xml_parent, 'publishers')
|
||||||
|
violations = XML.SubElement(publishers, 'hudson.plugins.violations.ViolationsPublisher')
|
||||||
|
config = XML.SubElement(violations, 'config')
|
||||||
|
suppressions = XML.SubElement(config, 'suppressions', {'class':'tree-set'})
|
||||||
|
XML.SubElement(suppressions, 'no-comparator')
|
||||||
|
configs = XML.SubElement(config, 'typeConfigs')
|
||||||
|
XML.SubElement(configs, 'no-comparator')
|
||||||
|
|
||||||
|
self._add_entry(configs, 'checkstyle')
|
||||||
|
self._add_entry(configs, 'codenarc')
|
||||||
|
self._add_entry(configs, 'cpd')
|
||||||
|
self._add_entry(configs, 'cpplint')
|
||||||
|
self._add_entry(configs, 'csslint')
|
||||||
|
self._add_entry(configs, 'findbugs')
|
||||||
|
self._add_entry(configs, 'fxcop')
|
||||||
|
self._add_entry(configs, 'gendarme')
|
||||||
|
self._add_entry(configs, 'jcreport')
|
||||||
|
self._add_entry(configs, 'jslint')
|
||||||
|
|
||||||
|
entry = XML.SubElement(configs, 'entry')
|
||||||
|
XML.SubElement(entry, 'string').text = 'pep8'
|
||||||
|
tconfig = XML.SubElement(entry, 'hudson.plugins.violations.TypeConfig')
|
||||||
|
XML.SubElement(tconfig, 'type').text = 'pep8'
|
||||||
|
XML.SubElement(tconfig, 'min').text = '0'
|
||||||
|
XML.SubElement(tconfig, 'max').text = '1'
|
||||||
|
XML.SubElement(tconfig, 'unstable').text = '1'
|
||||||
|
XML.SubElement(tconfig, 'usePattern').text = 'false'
|
||||||
|
XML.SubElement(tconfig, 'pattern').text = '**/pep8.txt'
|
||||||
|
|
||||||
|
self._add_entry(configs, 'pmd')
|
||||||
|
self._add_entry(configs, 'pylint')
|
||||||
|
self._add_entry(configs, 'simian')
|
||||||
|
self._add_entry(configs, 'stylecop')
|
||||||
|
|
||||||
|
XML.SubElement(config, 'limit').text = '100'
|
||||||
|
XML.SubElement(config, 'sourcePathPattern')
|
||||||
|
XML.SubElement(config, 'fauxProjectPath')
|
||||||
|
XML.SubElement(config, 'encoding').text = 'default'
|
29
modules/jenkins_jobs/files/modules/publisher_ppa.py
Normal file
29
modules/jenkins_jobs/files/modules/publisher_ppa.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for PPA publishers
|
||||||
|
# No additional YAML needed
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class publisher_ppa(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
publishers = XML.SubElement(xml_parent, 'publishers')
|
||||||
|
archiver = XML.SubElement(publishers, 'hudson.tasks.ArtifactArchiver')
|
||||||
|
XML.SubElement(archiver, 'artifacts').text = 'build/*.dsc,build/*.tar.gz,build/*.changes'
|
||||||
|
XML.SubElement(archiver, 'latestOnly').text = 'false'
|
54
modules/jenkins_jobs/files/modules/publisher_tarball.py
Normal file
54
modules/jenkins_jobs/files/modules/publisher_tarball.py
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for tarball publishers
|
||||||
|
# To use you can optionally add the following into your YAML:
|
||||||
|
# publisher:
|
||||||
|
# uploadProject: 'glance'
|
||||||
|
#
|
||||||
|
# If you do not add this it will default to the project specified in the YAML
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class publisher_tarball(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
if self.data.has_key('publisher') and self.data['publisher'].has_key('upload_project'):
|
||||||
|
project = self.data['publisher']['upload_project']
|
||||||
|
else:
|
||||||
|
project = self.data['main']['project']
|
||||||
|
publishers = XML.SubElement(xml_parent, 'publishers')
|
||||||
|
archiver = XML.SubElement(publishers, 'hudson.tasks.ArtifactArchiver')
|
||||||
|
XML.SubElement(archiver, 'artifacts').text = 'dist/*.tar.gz'
|
||||||
|
XML.SubElement(archiver, 'latestOnly').text = 'false'
|
||||||
|
scp = XML.SubElement(publishers, 'be.certipost.hudson.plugin.SCPRepositoryPublisher')
|
||||||
|
XML.SubElement(scp, 'siteName').text = '{proj}.{site}.org'.format(proj=project, site=self.data['main']['site'])
|
||||||
|
entries = XML.SubElement(scp, 'entries')
|
||||||
|
entry = XML.SubElement(entries, 'be.certipost.hudson.plugin.Entry')
|
||||||
|
XML.SubElement(entry, 'filePath').text = 'tarballs/{proj}/'.format(proj=project)
|
||||||
|
XML.SubElement(entry, 'sourceFile').text = 'dist/*.tar.gz'
|
||||||
|
XML.SubElement(entry, 'keepHierarchy').text = 'false'
|
||||||
|
btrigger = XML.SubElement(publishers, 'hudson.plugins.parameterizedtrigger.BuildTrigger')
|
||||||
|
btrigger_configs = XML.SubElement(btrigger, 'configs')
|
||||||
|
btrigger_config = XML.SubElement(btrigger_configs, 'hudson.plugins.parameterizedtrigger.BuildTriggerConfig')
|
||||||
|
configs = XML.SubElement(btrigger_config, 'configs')
|
||||||
|
parameters = XML.SubElement(configs, 'hudson.plugins.parameterizedtrigger.PredefinedBuildParameters')
|
||||||
|
properties = XML.SubElement(parameters, 'properties').text = 'BUILD_SELECTOR=<SpecificBuildSelector><buildNumber>$BUILD_NUMBER</buildNumber></SpecificBuildSelector>\n\
|
||||||
|
BRANCH=$GERRIT_REFNAME'
|
||||||
|
XML.SubElement(btrigger_config, 'projects').text = '{proj}-ppa'.format(proj=self.data['main']['project'])
|
||||||
|
XML.SubElement(btrigger_config, 'condition').text = 'SUCCESS'
|
||||||
|
XML.SubElement(btrigger_config, 'triggerWithNoParameters').text = 'false'
|
29
modules/jenkins_jobs/files/modules/publisher_venv.py
Normal file
29
modules/jenkins_jobs/files/modules/publisher_venv.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for venv publishers
|
||||||
|
# No additional YAML needed
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class publisher_venv(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
publishers = XML.SubElement(xml_parent, 'publishers')
|
||||||
|
archiver = XML.SubElement(publishers, 'hudson.tasks.ArtifactArchiver')
|
||||||
|
XML.SubElement(archiver, 'artifacts').text = 'jenkins_venvs/**/.cache.bundle'
|
||||||
|
XML.SubElement(archiver, 'latestOnly').text = 'false'
|
64
modules/jenkins_jobs/files/modules/scm.py
Normal file
64
modules/jenkins_jobs/files/modules/scm.py
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for scm
|
||||||
|
# To use add the folowing into your YAML:
|
||||||
|
# scm:
|
||||||
|
# scm: 'true'
|
||||||
|
# or
|
||||||
|
# scm: 'false'
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class scm(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
main = self.data['main']
|
||||||
|
scm_enabled = self.data['scm']['scm']
|
||||||
|
if scm_enabled == 'true':
|
||||||
|
scm = XML.SubElement(xml_parent, 'scm', {'class':'hudson.plugins.git.GitSCM'})
|
||||||
|
XML.SubElement(scm, 'configVersion').text = '2'
|
||||||
|
user = XML.SubElement(scm, 'userRemoteConfigs')
|
||||||
|
huser = XML.SubElement(user, 'hudson.plugins.git.UserRemoteConfig')
|
||||||
|
XML.SubElement(huser, 'name').text = 'origin'
|
||||||
|
XML.SubElement(huser, 'refspec').text = '+refs/heads/*:refs/remotes/origin/*'
|
||||||
|
XML.SubElement(huser, 'url').text = 'git://github.com/{site}/{project}.git'.format(site=main['site'], project=main['project'])
|
||||||
|
branches = XML.SubElement(scm, 'branches')
|
||||||
|
bspec = XML.SubElement(branches, 'hudson.plugins.git.BranchSpec')
|
||||||
|
XML.SubElement(bspec, 'name').text = '**'
|
||||||
|
XML.SubElement(scm, 'disableSubmodules').text = 'false'
|
||||||
|
XML.SubElement(scm, 'recursiveSubmodules').text = 'false'
|
||||||
|
XML.SubElement(scm, 'doGenerateSubmoduleConfigurations').text = 'false'
|
||||||
|
XML.SubElement(scm, 'authorOrCommitter').text = 'false'
|
||||||
|
XML.SubElement(scm, 'clean').text = 'false'
|
||||||
|
XML.SubElement(scm, 'wipeOutWorkspace').text = 'true'
|
||||||
|
XML.SubElement(scm, 'pruneBranches').text = 'false'
|
||||||
|
XML.SubElement(scm, 'remotePoll').text = 'false'
|
||||||
|
XML.SubElement(scm, 'buildChooser', {'class':'hudson.plugins.git.util.DefaultBuildChooser'})
|
||||||
|
XML.SubElement(scm, 'gitTool').text = 'Default'
|
||||||
|
XML.SubElement(scm, 'submoduleCfg', {'class':'list'})
|
||||||
|
XML.SubElement(scm, 'relativeTargetDir')
|
||||||
|
XML.SubElement(scm, 'reference')
|
||||||
|
XML.SubElement(scm, 'excludedRegions')
|
||||||
|
XML.SubElement(scm, 'excludedUsers')
|
||||||
|
XML.SubElement(scm, 'gitConfigName')
|
||||||
|
XML.SubElement(scm, 'gitConfigEmail')
|
||||||
|
XML.SubElement(scm, 'skipTag').text = 'false'
|
||||||
|
XML.SubElement(scm, 'scmName')
|
||||||
|
else:
|
||||||
|
XML.SubElement(xml_parent, 'scm', {'class':'hudson.scm.NullSCM'})
|
||||||
|
|
70
modules/jenkins_jobs/files/modules/trigger_gerrit.py
Normal file
70
modules/jenkins_jobs/files/modules/trigger_gerrit.py
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for gerrit triggers
|
||||||
|
# To use add the following into your YAML:
|
||||||
|
# trigger:
|
||||||
|
# triggerOnPatchsetUploadedEvent: 'false'
|
||||||
|
# triggerOnChangeMergedEvent: 'false'
|
||||||
|
# triggerOnCommentAddedEvent: 'true'
|
||||||
|
# triggerOnRefUpdatedEvent: 'false'
|
||||||
|
# triggerApprovalCategory: 'APRV'
|
||||||
|
# triggerApprovalValue: 1
|
||||||
|
# failureMessage: 'This change was unable to be automatically merged with the current state of the repository. Please rebase your change and upload a new patchset.'
|
||||||
|
# projects:
|
||||||
|
# - projectCompareType: 'PLAIN'
|
||||||
|
# projectPattern: 'openstack/nova'
|
||||||
|
# branchCompareType: 'ANT'
|
||||||
|
# branchPattern: '**'
|
||||||
|
# - projectCompareType: 'PLAIN'
|
||||||
|
# projectPattern: 'openstack/glance'
|
||||||
|
# branchCompareType: 'ANT'
|
||||||
|
# branchPattern: '**'
|
||||||
|
# ...
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class trigger_gerrit(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
trigger_data = self.data['trigger']
|
||||||
|
projects = trigger_data['projects']
|
||||||
|
trigger = XML.SubElement(xml_parent, 'triggers', {'class':'vector'})
|
||||||
|
gtrig = XML.SubElement(trigger, 'com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger')
|
||||||
|
XML.SubElement(gtrig, 'spec')
|
||||||
|
gprojects = XML.SubElement(gtrig, 'gerritProjects')
|
||||||
|
for project in projects:
|
||||||
|
gproj = XML.SubElement(gprojects, 'com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject')
|
||||||
|
XML.SubElement(gproj, 'compareType').text = project['projectCompareType']
|
||||||
|
XML.SubElement(gproj, 'pattern').text = project['projectPattern']
|
||||||
|
branches = XML.SubElement(gproj, 'branches')
|
||||||
|
gbranch = XML.SubElement(branches, 'com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch')
|
||||||
|
XML.SubElement(gbranch, 'compareType').text = project['branchCompareType']
|
||||||
|
XML.SubElement(gbranch, 'pattern').text = project['branchPattern']
|
||||||
|
XML.SubElement(gtrig, 'silentMode').text = 'false'
|
||||||
|
XML.SubElement(gtrig, 'escapeQuotes').text = 'true'
|
||||||
|
XML.SubElement(gtrig, 'triggerOnPatchsetUploadedEvent').text = trigger_data['triggerOnPatchsetUploadedEvent']
|
||||||
|
XML.SubElement(gtrig, 'triggerOnChangeMergedEvent').text = trigger_data['triggerOnChangeMergedEvent']
|
||||||
|
XML.SubElement(gtrig, 'triggerOnCommentAddedEvent').text = trigger_data['triggerOnCommentAddedEvent']
|
||||||
|
XML.SubElement(gtrig, 'triggerOnRefUpdatedEvent').text = trigger_data['triggerOnRefUpdatedEvent']
|
||||||
|
XML.SubElement(gtrig, 'commentAddedTriggerApprovalCategory').text = trigger_data['triggerApprovalCategory']
|
||||||
|
XML.SubElement(gtrig, 'commentAddedTriggerApprovalValue').text = str(trigger_data['triggerApprovalValue'])
|
||||||
|
XML.SubElement(gtrig, 'buildStartMessage')
|
||||||
|
XML.SubElement(gtrig, 'buildFailureMessage').text = trigger_data['failureMessage']
|
||||||
|
XML.SubElement(gtrig, 'buildSuccessfulMessage')
|
||||||
|
XML.SubElement(gtrig, 'buildUnstableMessage')
|
||||||
|
XML.SubElement(gtrig, 'customUrl')
|
26
modules/jenkins_jobs/files/modules/trigger_none.py
Normal file
26
modules/jenkins_jobs/files/modules/trigger_none.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for no triggers
|
||||||
|
# No additional YAML needed
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class trigger_none(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
XML.SubElement(xml_parent, 'triggers', {'class':'vector'})
|
33
modules/jenkins_jobs/files/modules/trigger_timed.py
Normal file
33
modules/jenkins_jobs/files/modules/trigger_timed.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# Copyright (C) 2012 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# Jenkins Job module for timed triggers
|
||||||
|
# To use add the following into your YAML:
|
||||||
|
# trigger:
|
||||||
|
# timed: '@midnight'
|
||||||
|
# or
|
||||||
|
# timed: '*/15 * * * *'
|
||||||
|
|
||||||
|
import xml.etree.ElementTree as XML
|
||||||
|
|
||||||
|
class trigger_timed(object):
|
||||||
|
def __init__(self, data):
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
def gen_xml(self, xml_parent):
|
||||||
|
time = self.data['trigger']['timed']
|
||||||
|
trigger = XML.SubElement(xml_parent, 'triggers', {'class':'vector'})
|
||||||
|
scmtrig = XML.SubElement(trigger, 'hudson.triggers.SCMTrigger')
|
||||||
|
XML.SubElement(scmtrig, 'spec').text = time
|
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
modules:
|
||||||
|
- properties
|
||||||
|
- scm
|
||||||
|
- assignednode
|
||||||
|
- trigger_gerrit
|
||||||
|
- builders
|
||||||
|
- publisher_none
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: 'gate-ceilometer-merge'
|
||||||
|
site: 'stackforge'
|
||||||
|
project: 'ceilometer'
|
||||||
|
authenticatedBuild: 'true'
|
||||||
|
disabled: 'false'
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
triggerOnPatchsetUploadedEvent: 'false'
|
||||||
|
triggerOnChangeMergedEvent: 'false'
|
||||||
|
triggerOnCommentAddedEvent: 'true'
|
||||||
|
triggerOnRefUpdatedEvent: 'false'
|
||||||
|
triggerApprovalCategory: 'APRV'
|
||||||
|
triggerApprovalValue: 1
|
||||||
|
failureMessage: 'This change was unable to be automatically merged with the current state of the repository. Please rebase your change and upload a new patchset.'
|
||||||
|
projects:
|
||||||
|
- projectCompareType: 'PLAIN'
|
||||||
|
projectPattern: 'stackforge/ceilometer'
|
||||||
|
branchCompareType: 'ANT'
|
||||||
|
branchPattern: '**'
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- gerrit_git_prep
|
||||||
|
|
||||||
|
scm:
|
||||||
|
scm: 'false'
|
||||||
|
|
||||||
|
assignednode:
|
||||||
|
node: 'oneiric'
|
329
modules/jenkins_jobs/files/projects/stackforge/reddwarf.yml
Normal file
329
modules/jenkins_jobs/files/projects/stackforge/reddwarf.yml
Normal file
@ -0,0 +1,329 @@
|
|||||||
|
---
|
||||||
|
# coverage
|
||||||
|
modules:
|
||||||
|
- logrotate
|
||||||
|
- properties
|
||||||
|
- scm
|
||||||
|
- assignednode
|
||||||
|
- trigger_timed
|
||||||
|
- builders
|
||||||
|
- publisher_coverage
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: 'reddwarf-coverage'
|
||||||
|
site: 'stackforge'
|
||||||
|
project: 'reddwarf'
|
||||||
|
authenticatedBuild: 'false'
|
||||||
|
disabled: 'true'
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
timed: '*/15 * * * *'
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- copy_bundle
|
||||||
|
- coverage
|
||||||
|
|
||||||
|
scm:
|
||||||
|
scm: 'true'
|
||||||
|
|
||||||
|
assignednode:
|
||||||
|
node: 'oneiric'
|
||||||
|
|
||||||
|
logrotate:
|
||||||
|
daysToKeep: 3
|
||||||
|
numToKeep: 20
|
||||||
|
artifactDaysToKeep: -1
|
||||||
|
artifactNumToKeep: -1
|
||||||
|
|
||||||
|
---
|
||||||
|
# pep8-gate
|
||||||
|
modules:
|
||||||
|
- properties
|
||||||
|
- scm
|
||||||
|
- assignednode
|
||||||
|
- trigger_gerrit
|
||||||
|
- builders
|
||||||
|
- publisher_pep8
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: 'gate-reddwarf-pep8'
|
||||||
|
site: 'stackforge'
|
||||||
|
project: 'reddwarf'
|
||||||
|
authenticatedBuild: 'true'
|
||||||
|
disabled: 'true'
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
triggerOnPatchsetUploadedEvent: 'false'
|
||||||
|
triggerOnChangeMergedEvent: 'false'
|
||||||
|
triggerOnCommentAddedEvent: 'true'
|
||||||
|
triggerOnRefUpdatedEvent: 'false'
|
||||||
|
triggerApprovalCategory: 'APRV'
|
||||||
|
triggerApprovalValue: 1
|
||||||
|
failureMessage: ''
|
||||||
|
projects:
|
||||||
|
- projectCompareType: 'PLAIN'
|
||||||
|
projectPattern: 'stackforge/reddwarf'
|
||||||
|
branchCompareType: 'ANT'
|
||||||
|
branchPattern: '**'
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- gerrit_git_prep
|
||||||
|
- copy_bundle
|
||||||
|
- pep8
|
||||||
|
|
||||||
|
scm:
|
||||||
|
scm: 'false'
|
||||||
|
|
||||||
|
assignednode:
|
||||||
|
node: 'oneiric'
|
||||||
|
|
||||||
|
---
|
||||||
|
# python26-gate
|
||||||
|
modules:
|
||||||
|
- properties
|
||||||
|
- scm
|
||||||
|
- assignednode
|
||||||
|
- trigger_gerrit
|
||||||
|
- builders
|
||||||
|
- publisher_none
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: 'gate-reddwarf-python26'
|
||||||
|
site: 'stackforge'
|
||||||
|
project: 'reddwarf'
|
||||||
|
authenticatedBuild: 'true'
|
||||||
|
disabled: 'true'
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
triggerOnPatchsetUploadedEvent: 'false'
|
||||||
|
triggerOnChangeMergedEvent: 'false'
|
||||||
|
triggerOnCommentAddedEvent: 'true'
|
||||||
|
triggerOnRefUpdatedEvent: 'false'
|
||||||
|
triggerApprovalCategory: 'APRV'
|
||||||
|
triggerApprovalValue: 1
|
||||||
|
failureMessage: ''
|
||||||
|
projects:
|
||||||
|
- projectCompareType: 'PLAIN'
|
||||||
|
projectPattern: 'stackforge/reddwarf'
|
||||||
|
branchCompareType: 'ANT'
|
||||||
|
branchPattern: '**'
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- gerrit_git_prep
|
||||||
|
- copy_bundle
|
||||||
|
- python26
|
||||||
|
|
||||||
|
scm:
|
||||||
|
scm: 'true'
|
||||||
|
|
||||||
|
assignednode:
|
||||||
|
node: 'oneiric'
|
||||||
|
|
||||||
|
---
|
||||||
|
# python27-gate
|
||||||
|
modules:
|
||||||
|
- properties
|
||||||
|
- scm
|
||||||
|
- assignednode
|
||||||
|
- trigger_gerrit
|
||||||
|
- builders
|
||||||
|
- publisher_none
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: 'gate-reddwarf-python27'
|
||||||
|
site: 'stackforge'
|
||||||
|
project: 'reddwarf'
|
||||||
|
authenticatedBuild: 'true'
|
||||||
|
disabled: 'true'
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
triggerOnPatchsetUploadedEvent: 'false'
|
||||||
|
triggerOnChangeMergedEvent: 'false'
|
||||||
|
triggerOnCommentAddedEvent: 'true'
|
||||||
|
triggerOnRefUpdatedEvent: 'false'
|
||||||
|
triggerApprovalCategory: 'APRV'
|
||||||
|
triggerApprovalValue: 1
|
||||||
|
failureMessage: ''
|
||||||
|
projects:
|
||||||
|
- projectCompareType: 'PLAIN'
|
||||||
|
projectPattern: 'stackforge/reddwarf'
|
||||||
|
branchCompareType: 'ANT'
|
||||||
|
branchPattern: '**'
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- gerrit_git_prep
|
||||||
|
- copy_bundle
|
||||||
|
- python27
|
||||||
|
|
||||||
|
scm:
|
||||||
|
scm: 'true'
|
||||||
|
|
||||||
|
assignednode:
|
||||||
|
node: 'oneiric'
|
||||||
|
|
||||||
|
---
|
||||||
|
# venv
|
||||||
|
modules:
|
||||||
|
- properties
|
||||||
|
- scm
|
||||||
|
- assignednode
|
||||||
|
- trigger_timed
|
||||||
|
- builders
|
||||||
|
- publisher_venv
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: 'reddwarf-venv'
|
||||||
|
site: 'stackforge'
|
||||||
|
project: 'reddwarf'
|
||||||
|
authenticatedBuild: 'false'
|
||||||
|
disabled: 'true'
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
timed: '@midnight'
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- venv
|
||||||
|
|
||||||
|
scm:
|
||||||
|
scm: 'true'
|
||||||
|
|
||||||
|
assignednode:
|
||||||
|
node: 'oneiric'
|
||||||
|
|
||||||
|
---
|
||||||
|
# docs
|
||||||
|
modules:
|
||||||
|
- properties
|
||||||
|
- scm
|
||||||
|
- assignednode
|
||||||
|
- trigger_timed
|
||||||
|
- builders
|
||||||
|
- publisher_docs
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: 'reddwarf-docs'
|
||||||
|
site: 'stackforge'
|
||||||
|
project: 'reddwarf'
|
||||||
|
authenticatedBuild: 'false'
|
||||||
|
disabled: 'true'
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
timed: '*/15 * * * *'
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- copy_bundle
|
||||||
|
- docs
|
||||||
|
|
||||||
|
scm:
|
||||||
|
scm: 'true'
|
||||||
|
|
||||||
|
assignednode:
|
||||||
|
node: 'oneiric'
|
||||||
|
|
||||||
|
---
|
||||||
|
# merge-gate
|
||||||
|
modules:
|
||||||
|
- properties
|
||||||
|
- scm
|
||||||
|
- assignednode
|
||||||
|
- trigger_gerrit
|
||||||
|
- builders
|
||||||
|
- publisher_none
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: 'gate-reddwarf-merge'
|
||||||
|
site: 'stackforge'
|
||||||
|
project: 'reddwarf'
|
||||||
|
authenticatedBuild: 'true'
|
||||||
|
disabled: 'true'
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
triggerOnPatchsetUploadedEvent: 'false'
|
||||||
|
triggerOnChangeMergedEvent: 'false'
|
||||||
|
triggerOnCommentAddedEvent: 'true'
|
||||||
|
triggerOnRefUpdatedEvent: 'false'
|
||||||
|
triggerApprovalCategory: 'APRV'
|
||||||
|
triggerApprovalValue: 1
|
||||||
|
failureMessage: 'This change was unable to be automatically merged with the current state of the repository. Please rebase your change and upload a new patchset.'
|
||||||
|
projects:
|
||||||
|
- projectCompareType: 'PLAIN'
|
||||||
|
projectPattern: 'stackforge/reddwarf'
|
||||||
|
branchCompareType: 'ANT'
|
||||||
|
branchPattern: '**'
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- gerrit_git_prep
|
||||||
|
|
||||||
|
scm:
|
||||||
|
scm: 'false'
|
||||||
|
|
||||||
|
assignednode:
|
||||||
|
node: 'oneiric'
|
||||||
|
|
||||||
|
---
|
||||||
|
# ppa
|
||||||
|
modules:
|
||||||
|
- properties
|
||||||
|
- scm
|
||||||
|
- assignednode
|
||||||
|
- trigger_none
|
||||||
|
- builders
|
||||||
|
- publisher_ppa
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: 'reddwarf-ppa'
|
||||||
|
site: 'stackforge'
|
||||||
|
project: 'reddwarf'
|
||||||
|
authenticatedBuild: 'false'
|
||||||
|
disabled: 'true'
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- ppa
|
||||||
|
|
||||||
|
scm:
|
||||||
|
scm: 'false'
|
||||||
|
|
||||||
|
assignednode:
|
||||||
|
node: 'oneiric'
|
||||||
|
|
||||||
|
---
|
||||||
|
# tarball
|
||||||
|
modules:
|
||||||
|
- properties
|
||||||
|
- scm
|
||||||
|
- assignednode
|
||||||
|
- trigger_gerrit
|
||||||
|
- builders
|
||||||
|
- publisher_tarball
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: 'reddwarf-tarball'
|
||||||
|
site: 'stackforge'
|
||||||
|
project: 'reddwarf'
|
||||||
|
authenticatedBulid: 'false'
|
||||||
|
disabled: 'true'
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
triggerOnPatchsetUploadedEvent: 'false'
|
||||||
|
triggerOnChangeMergedEvent: 'false'
|
||||||
|
triggerOnCommentAddedEvent: 'false'
|
||||||
|
triggerOnRefUpdatedEvent: 'true'
|
||||||
|
triggerApprovalCategory: ''
|
||||||
|
triggerApprovalValue: ''
|
||||||
|
failureMessage: ''
|
||||||
|
projects:
|
||||||
|
- projectCompareType: 'PLAIN'
|
||||||
|
projectPattern: 'stackforge/reddwarf'
|
||||||
|
branchCompareType: 'REG_EXP'
|
||||||
|
branchPattern: '^(?!refs/).*$'
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- gerrit_git_prep
|
||||||
|
- copy_bundle
|
||||||
|
- tarball
|
||||||
|
|
||||||
|
scm:
|
||||||
|
scm: 'true'
|
||||||
|
|
||||||
|
assignednode:
|
||||||
|
node: 'oneiric'
|
@ -1,13 +0,0 @@
|
|||||||
module Puppet::Parser::Functions
|
|
||||||
newfunction(:builder, :type => :rvalue) do |args|
|
|
||||||
file = "jenkins_jobs/builder_" + args[0] + ".xml.erb"
|
|
||||||
wrapper = Puppet::Parser::TemplateWrapper.new(self)
|
|
||||||
wrapper.file = file
|
|
||||||
begin
|
|
||||||
wrapper.result
|
|
||||||
rescue => detail
|
|
||||||
raise Puppet::ParseError,
|
|
||||||
"Failed to parse template #{file}: #{detail}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,13 +0,0 @@
|
|||||||
module Puppet::Parser::Functions
|
|
||||||
newfunction(:misc, :type => :rvalue) do |args|
|
|
||||||
file = "jenkins_jobs/" + args[0] + ".xml.erb"
|
|
||||||
wrapper = Puppet::Parser::TemplateWrapper.new(self)
|
|
||||||
wrapper.file = file
|
|
||||||
begin
|
|
||||||
wrapper.result
|
|
||||||
rescue => detail
|
|
||||||
raise Puppet::ParseError,
|
|
||||||
"Failed to parse template #{file}: #{detail}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,13 +0,0 @@
|
|||||||
module Puppet::Parser::Functions
|
|
||||||
newfunction(:publisher, :type => :rvalue) do |args|
|
|
||||||
file = "jenkins_jobs/publisher_" + args[0] + ".xml.erb"
|
|
||||||
wrapper = Puppet::Parser::TemplateWrapper.new(self)
|
|
||||||
wrapper.file = file
|
|
||||||
begin
|
|
||||||
wrapper.result
|
|
||||||
rescue => detail
|
|
||||||
raise Puppet::ParseError,
|
|
||||||
"Failed to parse template #{file}: #{detail}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,13 +0,0 @@
|
|||||||
module Puppet::Parser::Functions
|
|
||||||
newfunction(:scm, :type => :rvalue) do |args|
|
|
||||||
file = "jenkins_jobs/scm_" + args[0] + ".xml.erb"
|
|
||||||
wrapper = Puppet::Parser::TemplateWrapper.new(self)
|
|
||||||
wrapper.file = file
|
|
||||||
begin
|
|
||||||
wrapper.result
|
|
||||||
rescue => detail
|
|
||||||
raise Puppet::ParseError,
|
|
||||||
"Failed to parse template #{file}: #{detail}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,13 +0,0 @@
|
|||||||
module Puppet::Parser::Functions
|
|
||||||
newfunction(:trigger, :type => :rvalue) do |args|
|
|
||||||
file = "jenkins_jobs/trigger_" + args[0] + ".xml.erb"
|
|
||||||
wrapper = Puppet::Parser::TemplateWrapper.new(self)
|
|
||||||
wrapper.file = file
|
|
||||||
begin
|
|
||||||
wrapper.result
|
|
||||||
rescue => detail
|
|
||||||
raise Puppet::ParseError,
|
|
||||||
"Failed to parse template #{file}: #{detail}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,50 +0,0 @@
|
|||||||
define jenkins_jobs::build_job($site, $project, $job, $node_group, $triggers="", $builders, $publishers="", $logrotate="", $scm="", $trigger_branches="", $auth_build=false, $upload_project="", $ensure="present") {
|
|
||||||
|
|
||||||
if $ensure == "absent" {
|
|
||||||
file { "/var/lib/jenkins/jobs/${name}":
|
|
||||||
ensure => purged,
|
|
||||||
owner => 'jenkins',
|
|
||||||
recurse => true,
|
|
||||||
notify => Exec['jenkins']
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if $ensure == "disabled" {
|
|
||||||
$disabled = true
|
|
||||||
} else {
|
|
||||||
$disabled = false
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "/var/lib/jenkins/jobs/${name}":
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'jenkins',
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "/var/lib/jenkins/jobs/${name}/builds":
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'jenkins',
|
|
||||||
require => File["/var/lib/jenkins/jobs/${name}"]
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "/var/lib/jenkins/jobs/${name}/config-history":
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'jenkins',
|
|
||||||
require => File["/var/lib/jenkins/jobs/${name}"]
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "/var/lib/jenkins/jobs/${name}/config.xml":
|
|
||||||
ensure => present,
|
|
||||||
content => template("jenkins_jobs/body.xml.erb"),
|
|
||||||
owner => 'jenkins',
|
|
||||||
require => File["/var/lib/jenkins/jobs/${name}"],
|
|
||||||
notify => Exec["jenkins"]
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "/var/lib/jenkins/jobs/${name}/nextBuildNumber":
|
|
||||||
ensure => present,
|
|
||||||
content => "1",
|
|
||||||
owner => 'jenkins',
|
|
||||||
replace => false,
|
|
||||||
require => File["/var/lib/jenkins/jobs/${name}"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
define jenkins_jobs::generic_jobs($site, $project, $node_group, $ensure="present") {
|
|
||||||
jenkins_jobs::jobs::docs { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
|
|
||||||
jenkins_jobs::jobs::merge_check { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
trigger_branches => [[$project, '**']],
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
|
|
||||||
jenkins_jobs::jobs::merge_gate { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
trigger_branches => [[$project, '**']],
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
|
|
||||||
jenkins_jobs::jobs::ppa { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
|
|
||||||
jenkins_jobs::jobs::tarball { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
upload_project => $project,
|
|
||||||
trigger_branches => [[$project, '^(?!refs/).*$']],
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,6 +1,25 @@
|
|||||||
class jenkins_jobs($site) {
|
class jenkins_jobs($site, $projects) {
|
||||||
exec { "jenkins":
|
file { '/usr/local/jenkins_jobs':
|
||||||
command => "/usr/bin/curl https://jenkins.${site}.org/reload",
|
owner => 'root',
|
||||||
refreshonly => true
|
group => 'root',
|
||||||
|
mode => 755,
|
||||||
|
ensure => 'directory',
|
||||||
|
recurse => true,
|
||||||
|
source => ['puppet:///modules/jenkins_jobs/']
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/usr/local/jenkins_jobs/jenkins_jobs.ini':
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => 440,
|
||||||
|
ensure => 'present',
|
||||||
|
source => 'file:///root/secret-files/jenkins_jobs.ini',
|
||||||
|
replace => 'true',
|
||||||
|
require => File['/usr/local/jenkins_jobs']
|
||||||
|
}
|
||||||
|
|
||||||
|
jenkins_jobs::process_projects { $projects:
|
||||||
|
site => $site,
|
||||||
|
require => File['/usr/local/jenkins_jobs/jenkins_jobs.ini']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::coverage($site, $project, $node_group, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "${name}-coverage":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "coverage",
|
|
||||||
node_group => $node_group,
|
|
||||||
logrotate => misc("logrotate"),
|
|
||||||
builders => [builder("copy_bundle"), builder("coverage")],
|
|
||||||
publishers => publisher("coverage"),
|
|
||||||
triggers => trigger("timed_15mins"),
|
|
||||||
scm => scm("git")
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::docs($site, $project, $node_group, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "${name}-docs":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "docs",
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("timed_15mins"),
|
|
||||||
builders => [builder("copy_bundle"), builder("docs")],
|
|
||||||
publishers => publisher("docs"),
|
|
||||||
scm => scm("git")
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::merge_check($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "check-${name}-merge":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "merge",
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("gerrit_uploaded_merge"),
|
|
||||||
builders => builder("gerrit_git_prep"),
|
|
||||||
trigger_branches => $trigger_branches,
|
|
||||||
auth_build => true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::merge_gate($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "gate-${name}-merge":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "merge",
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("gerrit_comment_merge"),
|
|
||||||
builders => builder("gerrit_git_prep"),
|
|
||||||
trigger_branches => $trigger_branches,
|
|
||||||
auth_build => true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::pep8_check($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "check-${name}-pep8":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "pep8",
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("gerrit_uploaded_plain"),
|
|
||||||
builders => [builder("gerrit_git_prep"), builder("copy_bundle"), builder("pep8")],
|
|
||||||
publishers => publisher("pep8"),
|
|
||||||
trigger_branches => $trigger_branches,
|
|
||||||
auth_build => true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::pep8_gate($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "gate-${name}-pep8":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "pep8",
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("gerrit_comment_plain"),
|
|
||||||
builders => [builder("gerrit_git_prep"), builder("copy_bundle"), builder("pep8")],
|
|
||||||
publishers => publisher("pep8"),
|
|
||||||
trigger_branches => $trigger_branches,
|
|
||||||
auth_build => true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::ppa($site, $project, $node_group, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "${name}-ppa":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "ppa",
|
|
||||||
node_group => $node_group,
|
|
||||||
builders => builder("ppa"),
|
|
||||||
publishers => publisher("ppa")
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::python26_check($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "check-${name}-python26":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "python26",
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("gerrit_uploaded_plain"),
|
|
||||||
builders => [builder("gerrit_git_prep"), builder("copy_bundle"), builder("python26")],
|
|
||||||
trigger_branches => $trigger_branches,
|
|
||||||
auth_build => true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::python26_gate($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "gate-${name}-python26":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "python26",
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("gerrit_comment_plain"),
|
|
||||||
builders => [builder("gerrit_git_prep"), builder("copy_bundle"), builder("python26")],
|
|
||||||
trigger_branches => $trigger_branches,
|
|
||||||
auth_build => true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::python27_check($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "check-${name}-python27":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "python27",
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("gerrit_uploaded_plain"),
|
|
||||||
builders => [builder("gerrit_git_prep"), builder("copy_bundle"), builder("python27")],
|
|
||||||
trigger_branches => $trigger_branches,
|
|
||||||
auth_build => true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::python27_gate($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "gate-${name}-python27":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "python27",
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("gerrit_comment_plain"),
|
|
||||||
builders => [builder("gerrit_git_prep"), builder("copy_bundle"), builder("python27")],
|
|
||||||
trigger_branches => $trigger_branches,
|
|
||||||
auth_build => true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::tarball($site, $project, $node_group, $trigger_branches, $upload_project, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "${name}-tarball":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "tarball",
|
|
||||||
upload_project => $upload_project,
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("gerrit_ref_updated"),
|
|
||||||
builders => [builder("gerrit_git_prep"), builder("copy_bundle"), builder("tarball")],
|
|
||||||
publishers => publisher("tarball"),
|
|
||||||
trigger_branches => $trigger_branches
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
define jenkins_jobs::jobs::venv($site, $project, $node_group, $ensure="present") {
|
|
||||||
jenkins_jobs::build_job { "${name}-venv":
|
|
||||||
ensure => $ensure,
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
job => "venv",
|
|
||||||
node_group => $node_group,
|
|
||||||
triggers => trigger("timed_midnight"),
|
|
||||||
builders => builder("venv"),
|
|
||||||
publishers => publisher("venv"),
|
|
||||||
scm => scm("git")
|
|
||||||
}
|
|
||||||
}
|
|
8
modules/jenkins_jobs/manifests/process_projects.pp
Normal file
8
modules/jenkins_jobs/manifests/process_projects.pp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
define process_projects($site) {
|
||||||
|
exec { 'jenkins_job':
|
||||||
|
command => "python /usr/local/jenkins_jobs/jenkins_jobs.py update /usr/local/jenkins_jobs/projects/${site}/${name}.yml",
|
||||||
|
cwd => '/usr/local/jenkins_jobs/',
|
||||||
|
path => '/bin:/usr/bin'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,56 +0,0 @@
|
|||||||
define jenkins_jobs::python_jobs($site, $project, $node_group, $ensure="present") {
|
|
||||||
jenkins_jobs::jobs::coverage { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
jenkins_jobs::jobs::pep8_check { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
trigger_branches => [[$project, '**']],
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
jenkins_jobs::jobs::python26_check { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
trigger_branches => [[$project, '**']],
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
jenkins_jobs::jobs::python27_check { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
trigger_branches => [[$project, '**']],
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
jenkins_jobs::jobs::pep8_gate { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
trigger_branches => [[$project, '**']],
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
jenkins_jobs::jobs::python26_gate { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
trigger_branches => [[$project, '**']],
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
jenkins_jobs::jobs::python27_gate { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
trigger_branches => [[$project, '**']],
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
jenkins_jobs::jobs::venv { $name:
|
|
||||||
site => $site,
|
|
||||||
project => $project,
|
|
||||||
node_group => $node_group,
|
|
||||||
ensure => $ensure
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,70 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<project>
|
|
||||||
<actions/>
|
|
||||||
<description>
|
|
||||||
THIS JOB IS MANAGED BY PUPPET AND WILL BE OVERWRITTEN.
|
|
||||||
|
|
||||||
DON'T EDIT THIS JOB THROUGH THE WEB
|
|
||||||
|
|
||||||
If you would like to make changes to this job, please see:
|
|
||||||
|
|
||||||
https://github.com/openstack/openstack-ci-puppet
|
|
||||||
|
|
||||||
In modules/jenkins_jobs
|
|
||||||
</description>
|
|
||||||
<%= logrotate %>
|
|
||||||
<keepDependencies>false</keepDependencies>
|
|
||||||
<properties>
|
|
||||||
<com.coravy.hudson.plugins.github.GithubProjectProperty>
|
|
||||||
<projectUrl>https://github.com/<%= site %>/<%= project %>/</projectUrl>
|
|
||||||
</com.coravy.hudson.plugins.github.GithubProjectProperty>
|
|
||||||
<hudson.plugins.throttleconcurrents.ThrottleJobProperty>
|
|
||||||
<maxConcurrentPerNode>0</maxConcurrentPerNode>
|
|
||||||
<maxConcurrentTotal>0</maxConcurrentTotal>
|
|
||||||
<categories/>
|
|
||||||
<throttleEnabled>false</throttleEnabled>
|
|
||||||
<throttleOption>project</throttleOption>
|
|
||||||
<configVersion>1</configVersion>
|
|
||||||
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
|
|
||||||
<EnvInjectJobProperty>
|
|
||||||
<info>
|
|
||||||
<propertiesContent>PROJECT=<%= project %></propertiesContent>
|
|
||||||
<loadFilesFromMaster>false</loadFilesFromMaster>
|
|
||||||
</info>
|
|
||||||
<on>true</on>
|
|
||||||
<keepJenkinsSystemVariables>true</keepJenkinsSystemVariables>
|
|
||||||
<keepBuildVariables>true</keepBuildVariables>
|
|
||||||
<contributors/>
|
|
||||||
</EnvInjectJobProperty>
|
|
||||||
<% if auth_build == true %>
|
|
||||||
<hudson.security.AuthorizationMatrixProperty>
|
|
||||||
<permission>hudson.model.Item.Build:authenticated</permission>
|
|
||||||
</hudson.security.AuthorizationMatrixProperty>
|
|
||||||
<% end %>
|
|
||||||
</properties>
|
|
||||||
<% if scm == "" %>
|
|
||||||
<scm class="hudson.scm.NullSCM"/>
|
|
||||||
<% else %>
|
|
||||||
<%= scm %>
|
|
||||||
<% end %>
|
|
||||||
<assignedNode><%= node_group %></assignedNode>
|
|
||||||
<canRoam>false</canRoam>
|
|
||||||
<% if disabled == true %>
|
|
||||||
<disabled>true</disabled>
|
|
||||||
<% else %>
|
|
||||||
<disabled>false</disabled>
|
|
||||||
<% end %>
|
|
||||||
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
|
|
||||||
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
|
|
||||||
<triggers class="vector">
|
|
||||||
<%= triggers %>
|
|
||||||
</triggers>
|
|
||||||
<concurrentBuild>false</concurrentBuild>
|
|
||||||
<builders>
|
|
||||||
<%= builders %>
|
|
||||||
</builders>
|
|
||||||
<publishers>
|
|
||||||
<%= publishers %>
|
|
||||||
</publishers>
|
|
||||||
<buildWrappers/>
|
|
||||||
</project>
|
|
@ -1,9 +0,0 @@
|
|||||||
<hudson.plugins.copyartifact.CopyArtifact>
|
|
||||||
<projectName>$PROJECT-venv</projectName>
|
|
||||||
<filter></filter>
|
|
||||||
<target></target>
|
|
||||||
<selector class="hudson.plugins.copyartifact.StatusBuildSelector"/>
|
|
||||||
</hudson.plugins.copyartifact.CopyArtifact>
|
|
||||||
<hudson.tasks.Shell>
|
|
||||||
<command>/usr/local/jenkins/slave_scripts/copy-bundle.sh</command>
|
|
||||||
</hudson.tasks.Shell>
|
|
@ -1,4 +0,0 @@
|
|||||||
<hudson.tasks.Shell>
|
|
||||||
<command>/usr/local/jenkins/slave_scripts/run-cover.sh</command>
|
|
||||||
</hudson.tasks.Shell>
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
<hudson.tasks.Shell>
|
|
||||||
<command>/usr/local/jenkins/slave_scripts/run-docs.sh</command>
|
|
||||||
</hudson.tasks.Shell>
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
<hudson.tasks.Shell>
|
|
||||||
<command>/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh <%= site %> </command>
|
|
||||||
</hudson.tasks.Shell>
|
|
@ -1,3 +0,0 @@
|
|||||||
<hudson.tasks.Shell>
|
|
||||||
<command>tox -v -epep8 | tee pep8.txt</command>
|
|
||||||
</hudson.tasks.Shell>
|
|
@ -1,22 +0,0 @@
|
|||||||
<hudson.tasks.Shell>
|
|
||||||
<command>rm -rf build dist.zip
|
|
||||||
mkdir build
|
|
||||||
</command>
|
|
||||||
</hudson.tasks.Shell>
|
|
||||||
<hudson.plugins.copyartifact.CopyArtifact>
|
|
||||||
<projectName><%= project %>-tarball</projectName>
|
|
||||||
<filter>dist/*.tar.gz</filter>
|
|
||||||
<target>build</target>
|
|
||||||
<selector class="hudson.plugins.copyartifact.ParameterizedBuildSelector">
|
|
||||||
<parameterName>BUILD_SELECTOR</parameterName>
|
|
||||||
</selector>
|
|
||||||
</hudson.plugins.copyartifact.CopyArtifact>
|
|
||||||
<hudson.tasks.Shell>
|
|
||||||
<command>#!/bin/bash
|
|
||||||
|
|
||||||
#export DO_UPLOAD="no"
|
|
||||||
export PROJECT="<%= project %>"
|
|
||||||
export GERRIT_REFNAME=$BRANCH
|
|
||||||
/usr/local/jenkins/slave_scripts/create-ppa-package.sh
|
|
||||||
</command>
|
|
||||||
</hudson.tasks.Shell>
|
|
@ -1,3 +0,0 @@
|
|||||||
<hudson.tasks.Shell>
|
|
||||||
<command>/usr/local/jenkins/slave_scripts/run-tox.sh 26</command>
|
|
||||||
</hudson.tasks.Shell>
|
|
@ -1,3 +0,0 @@
|
|||||||
<hudson.tasks.Shell>
|
|
||||||
<command>/usr/local/jenkins/slave_scripts/run-tox.sh 27</command>
|
|
||||||
</hudson.tasks.Shell>
|
|
@ -1,3 +0,0 @@
|
|||||||
<hudson.tasks.Shell>
|
|
||||||
<command>/usr/local/jenkins/slave_scripts/create-tarball.sh</command>
|
|
||||||
</hudson.tasks.Shell>
|
|
@ -1,3 +0,0 @@
|
|||||||
<hudson.tasks.Shell>
|
|
||||||
<command>/usr/local/jenkins/slave_scripts/build-bundle.sh</command>
|
|
||||||
</hudson.tasks.Shell>
|
|
@ -1,7 +0,0 @@
|
|||||||
<logRotator>
|
|
||||||
<daysToKeep>3</daysToKeep>
|
|
||||||
<numToKeep>20</numToKeep>
|
|
||||||
<artifactDaysToKeep>-1</artifactDaysToKeep>
|
|
||||||
<artifactNumToKeep>-1</artifactNumToKeep>
|
|
||||||
</logRotator>
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
<hudson.plugins.cobertura.CoberturaPublisher>
|
|
||||||
<coberturaReportFile>**/coverage.xml</coberturaReportFile>
|
|
||||||
<onlyStable>false</onlyStable>
|
|
||||||
<healthyTarget>
|
|
||||||
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
|
|
||||||
<entry>
|
|
||||||
<hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
|
|
||||||
<int>70</int>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
|
|
||||||
<int>80</int>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
|
|
||||||
<int>80</int>
|
|
||||||
</entry>
|
|
||||||
</targets>
|
|
||||||
</healthyTarget>
|
|
||||||
<unhealthyTarget>
|
|
||||||
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
|
|
||||||
<entry>
|
|
||||||
<hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
|
|
||||||
<int>0</int>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
|
|
||||||
<int>0</int>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
|
|
||||||
<int>0</int>
|
|
||||||
</entry>
|
|
||||||
</targets>
|
|
||||||
</unhealthyTarget>
|
|
||||||
<failingTarget>
|
|
||||||
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
|
|
||||||
<entry>
|
|
||||||
<hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
|
|
||||||
<int>0</int>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
|
|
||||||
<int>0</int>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
|
|
||||||
<int>0</int>
|
|
||||||
</entry>
|
|
||||||
</targets>
|
|
||||||
</failingTarget>
|
|
||||||
<sourceEncoding>ASCII</sourceEncoding>
|
|
||||||
</hudson.plugins.cobertura.CoberturaPublisher>
|
|
@ -1,20 +0,0 @@
|
|||||||
<be.certipost.hudson.plugin.SCPRepositoryPublisher>
|
|
||||||
<siteName><%= project %>.<%= site %>.org</siteName>
|
|
||||||
<entries>
|
|
||||||
<be.certipost.hudson.plugin.Entry>
|
|
||||||
<filePath>docs/<%= project %></filePath>
|
|
||||||
<sourceFile>doc/build/html/**</sourceFile>
|
|
||||||
<keepHierarchy>false</keepHierarchy>
|
|
||||||
</be.certipost.hudson.plugin.Entry>
|
|
||||||
<be.certipost.hudson.plugin.Entry>
|
|
||||||
<filePath>docs/<%= project %>/_static</filePath>
|
|
||||||
<sourceFile>doc/build/html/_static/**</sourceFile>
|
|
||||||
<keepHierarchy>false</keepHierarchy>
|
|
||||||
</be.certipost.hudson.plugin.Entry>
|
|
||||||
<be.certipost.hudson.plugin.Entry>
|
|
||||||
<filePath>docs/<%= project %>/_sources</filePath>
|
|
||||||
<sourceFile>doc/build/html/_sources/**</sourceFile>
|
|
||||||
<keepHierarchy>false</keepHierarchy>
|
|
||||||
</be.certipost.hudson.plugin.Entry>
|
|
||||||
</entries>
|
|
||||||
</be.certipost.hudson.plugin.SCPRepositoryPublisher>
|
|
@ -1,179 +0,0 @@
|
|||||||
<hudson.plugins.violations.ViolationsPublisher>
|
|
||||||
<config>
|
|
||||||
<suppressions class="tree-set">
|
|
||||||
<no-comparator/>
|
|
||||||
</suppressions>
|
|
||||||
<typeConfigs>
|
|
||||||
<no-comparator/>
|
|
||||||
<entry>
|
|
||||||
<string>checkstyle</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>checkstyle</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>codenarc</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>codenarc</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>cpd</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>cpd</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>cpplint</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>cpplint</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>csslint</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>csslint</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>findbugs</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>findbugs</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>fxcop</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>fxcop</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>gendarme</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>gendarme</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>jcreport</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>jcreport</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>jslint</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>jslint</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>pep8</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>pep8</type>
|
|
||||||
<min>0</min>
|
|
||||||
<max>1</max>
|
|
||||||
<unstable>1</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern>**/pep8.txt</pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>pmd</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>pmd</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>pylint</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>pylint</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>simian</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>simian</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<string>stylecop</string>
|
|
||||||
<hudson.plugins.violations.TypeConfig>
|
|
||||||
<type>stylecop</type>
|
|
||||||
<min>10</min>
|
|
||||||
<max>999</max>
|
|
||||||
<unstable>999</unstable>
|
|
||||||
<usePattern>false</usePattern>
|
|
||||||
<pattern></pattern>
|
|
||||||
</hudson.plugins.violations.TypeConfig>
|
|
||||||
</entry>
|
|
||||||
</typeConfigs>
|
|
||||||
<limit>100</limit>
|
|
||||||
<sourcePathPattern></sourcePathPattern>
|
|
||||||
<fauxProjectPath></fauxProjectPath>
|
|
||||||
<encoding>default</encoding>
|
|
||||||
</config>
|
|
||||||
</hudson.plugins.violations.ViolationsPublisher>
|
|
@ -1,4 +0,0 @@
|
|||||||
<hudson.tasks.ArtifactArchiver>
|
|
||||||
<artifacts>build/*.dsc,build/*.tar.gz,build/*.changes</artifacts>
|
|
||||||
<latestOnly>false</latestOnly>
|
|
||||||
</hudson.tasks.ArtifactArchiver>
|
|
@ -1,30 +0,0 @@
|
|||||||
<hudson.tasks.ArtifactArchiver>
|
|
||||||
<artifacts>dist/*.tar.gz</artifacts>
|
|
||||||
<latestOnly>false</latestOnly>
|
|
||||||
</hudson.tasks.ArtifactArchiver>
|
|
||||||
<be.certipost.hudson.plugin.SCPRepositoryPublisher>
|
|
||||||
<siteName><%= upload_project %>.<%= site %>.org</siteName>
|
|
||||||
<entries>
|
|
||||||
<be.certipost.hudson.plugin.Entry>
|
|
||||||
<filePath>tarballs/<%= upload_project %>/</filePath>
|
|
||||||
<sourceFile>dist/*.tar.gz</sourceFile>
|
|
||||||
<keepHierarchy>false</keepHierarchy>
|
|
||||||
</be.certipost.hudson.plugin.Entry>
|
|
||||||
</entries>
|
|
||||||
</be.certipost.hudson.plugin.SCPRepositoryPublisher>
|
|
||||||
<hudson.plugins.parameterizedtrigger.BuildTrigger>
|
|
||||||
<configs>
|
|
||||||
<hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
|
|
||||||
<configs>
|
|
||||||
<hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
|
|
||||||
<properties>BUILD_SELECTOR=<SpecificBuildSelector><buildNumber>$BUILD_NUMBER</buildNumber></SpecificBuildSelector>
|
|
||||||
BRANCH=$GERRIT_REFNAME
|
|
||||||
</properties>
|
|
||||||
</hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
|
|
||||||
</configs>
|
|
||||||
<projects><%= project %>-ppa</projects>
|
|
||||||
<condition>SUCCESS</condition>
|
|
||||||
<triggerWithNoParameters>false</triggerWithNoParameters>
|
|
||||||
</hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
|
|
||||||
</configs>
|
|
||||||
</hudson.plugins.parameterizedtrigger.BuildTrigger>
|
|
@ -1,4 +0,0 @@
|
|||||||
<hudson.tasks.ArtifactArchiver>
|
|
||||||
<artifacts>jenkins_venvs/**/.cache.bundle</artifacts>
|
|
||||||
<latestOnly>false</latestOnly>
|
|
||||||
</hudson.tasks.ArtifactArchiver>
|
|
@ -1,34 +0,0 @@
|
|||||||
<scm class="hudson.plugins.git.GitSCM">
|
|
||||||
<configVersion>2</configVersion>
|
|
||||||
<userRemoteConfigs>
|
|
||||||
<hudson.plugins.git.UserRemoteConfig>
|
|
||||||
<name>origin</name>
|
|
||||||
<refspec>+refs/heads/*:refs/remotes/origin/*</refspec>
|
|
||||||
<url>git://github.com/<%= site %>/<%= project %>.git</url>
|
|
||||||
</hudson.plugins.git.UserRemoteConfig>
|
|
||||||
</userRemoteConfigs>
|
|
||||||
<branches>
|
|
||||||
<hudson.plugins.git.BranchSpec>
|
|
||||||
<name>**</name>
|
|
||||||
</hudson.plugins.git.BranchSpec>
|
|
||||||
</branches>
|
|
||||||
<disableSubmodules>false</disableSubmodules>
|
|
||||||
<recursiveSubmodules>false</recursiveSubmodules>
|
|
||||||
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
|
|
||||||
<authorOrCommitter>false</authorOrCommitter>
|
|
||||||
<clean>false</clean>
|
|
||||||
<wipeOutWorkspace>true</wipeOutWorkspace>
|
|
||||||
<pruneBranches>false</pruneBranches>
|
|
||||||
<remotePoll>false</remotePoll>
|
|
||||||
<buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
|
|
||||||
<gitTool>Default</gitTool>
|
|
||||||
<submoduleCfg class="list"/>
|
|
||||||
<relativeTargetDir></relativeTargetDir>
|
|
||||||
<reference></reference>
|
|
||||||
<excludedRegions></excludedRegions>
|
|
||||||
<excludedUsers></excludedUsers>
|
|
||||||
<gitConfigName></gitConfigName>
|
|
||||||
<gitConfigEmail></gitConfigEmail>
|
|
||||||
<skipTag>false</skipTag>
|
|
||||||
<scmName></scmName>
|
|
||||||
</scm>
|
|
@ -1,30 +0,0 @@
|
|||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
|
||||||
<spec></spec>
|
|
||||||
<gerritProjects>
|
|
||||||
<% trigger_branches.each do |trigger| %>
|
|
||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
|
||||||
<compareType>PLAIN</compareType>
|
|
||||||
<pattern><%= site %>/<%= trigger[0] %></pattern>
|
|
||||||
<branches>
|
|
||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
|
||||||
<compareType>ANT</compareType>
|
|
||||||
<pattern><%= trigger[1] %></pattern>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
|
||||||
</branches>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
|
||||||
<% end %>
|
|
||||||
</gerritProjects>
|
|
||||||
<silentMode>false</silentMode>
|
|
||||||
<escapeQuotes>true</escapeQuotes>
|
|
||||||
<triggerOnPatchsetUploadedEvent>false</triggerOnPatchsetUploadedEvent>
|
|
||||||
<triggerOnChangeMergedEvent>false</triggerOnChangeMergedEvent>
|
|
||||||
<triggerOnCommentAddedEvent>true</triggerOnCommentAddedEvent>
|
|
||||||
<triggerOnRefUpdatedEvent>false</triggerOnRefUpdatedEvent>
|
|
||||||
<commentAddedTriggerApprovalCategory>APRV</commentAddedTriggerApprovalCategory>
|
|
||||||
<commentAddedTriggerApprovalValue>1</commentAddedTriggerApprovalValue>
|
|
||||||
<buildStartMessage></buildStartMessage>
|
|
||||||
<buildFailureMessage>This change was unable to be automatically merged with the current state of the repository. Please rebase your change and upload a new patchset.</buildFailureMessage>
|
|
||||||
<buildSuccessfulMessage></buildSuccessfulMessage>
|
|
||||||
<buildUnstableMessage></buildUnstableMessage>
|
|
||||||
<customUrl></customUrl>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
|
@ -1,30 +0,0 @@
|
|||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
|
||||||
<spec></spec>
|
|
||||||
<gerritProjects>
|
|
||||||
<% trigger_branches.each do |trigger| %>
|
|
||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
|
||||||
<compareType>PLAIN</compareType>
|
|
||||||
<pattern><%= site %>/<%= trigger[0] %></pattern>
|
|
||||||
<branches>
|
|
||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
|
||||||
<compareType>ANT</compareType>
|
|
||||||
<pattern><%= trigger[1] %></pattern>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
|
||||||
</branches>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
|
||||||
<% end %>
|
|
||||||
</gerritProjects>
|
|
||||||
<silentMode>false</silentMode>
|
|
||||||
<escapeQuotes>true</escapeQuotes>
|
|
||||||
<triggerOnPatchsetUploadedEvent>false</triggerOnPatchsetUploadedEvent>
|
|
||||||
<triggerOnChangeMergedEvent>false</triggerOnChangeMergedEvent>
|
|
||||||
<triggerOnCommentAddedEvent>true</triggerOnCommentAddedEvent>
|
|
||||||
<triggerOnRefUpdatedEvent>false</triggerOnRefUpdatedEvent>
|
|
||||||
<commentAddedTriggerApprovalCategory>APRV</commentAddedTriggerApprovalCategory>
|
|
||||||
<commentAddedTriggerApprovalValue>1</commentAddedTriggerApprovalValue>
|
|
||||||
<buildStartMessage></buildStartMessage>
|
|
||||||
<buildFailureMessage></buildFailureMessage>
|
|
||||||
<buildSuccessfulMessage></buildSuccessfulMessage>
|
|
||||||
<buildUnstableMessage></buildUnstableMessage>
|
|
||||||
<customUrl></customUrl>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
|
@ -1,30 +0,0 @@
|
|||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
|
||||||
<spec></spec>
|
|
||||||
<gerritProjects>
|
|
||||||
<% trigger_branches.each do |trigger| %>
|
|
||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
|
||||||
<compareType>PLAIN</compareType>
|
|
||||||
<pattern><%= site %>/<%= trigger[0] %></pattern>
|
|
||||||
<branches>
|
|
||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
|
||||||
<compareType>REG_EXP</compareType>
|
|
||||||
<pattern><%= trigger[1] %></pattern>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
|
||||||
</branches>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
|
||||||
<% end %>
|
|
||||||
</gerritProjects>
|
|
||||||
<silentMode>false</silentMode>
|
|
||||||
<escapeQuotes>true</escapeQuotes>
|
|
||||||
<triggerOnPatchsetUploadedEvent>false</triggerOnPatchsetUploadedEvent>
|
|
||||||
<triggerOnChangeMergedEvent>false</triggerOnChangeMergedEvent>
|
|
||||||
<triggerOnCommentAddedEvent>false</triggerOnCommentAddedEvent>
|
|
||||||
<triggerOnRefUpdatedEvent>true</triggerOnRefUpdatedEvent>
|
|
||||||
<commentAddedTriggerApprovalCategory></commentAddedTriggerApprovalCategory>
|
|
||||||
<commentAddedTriggerApprovalValue></commentAddedTriggerApprovalValue>
|
|
||||||
<buildStartMessage></buildStartMessage>
|
|
||||||
<buildFailureMessage></buildFailureMessage>
|
|
||||||
<buildSuccessfulMessage></buildSuccessfulMessage>
|
|
||||||
<buildUnstableMessage></buildUnstableMessage>
|
|
||||||
<customUrl></customUrl>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
|
@ -1,36 +0,0 @@
|
|||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
|
||||||
<spec></spec>
|
|
||||||
<gerritProjects>
|
|
||||||
<% trigger_branches.each do |trigger| %>
|
|
||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
|
||||||
<compareType>PLAIN</compareType>
|
|
||||||
<pattern><%= site %>/<%= trigger[0] %></pattern>
|
|
||||||
<branches>
|
|
||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
|
||||||
<compareType>ANT</compareType>
|
|
||||||
<pattern><%= trigger[1] %></pattern>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
|
||||||
</branches>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
|
||||||
<% end %>
|
|
||||||
</gerritProjects>
|
|
||||||
<gerritBuildStartedVerifiedValue>0</gerritBuildStartedVerifiedValue>
|
|
||||||
<gerritBuildStartedCodeReviewValue>0</gerritBuildStartedCodeReviewValue>
|
|
||||||
<gerritBuildSuccessfulVerifiedValue>1</gerritBuildSuccessfulVerifiedValue>
|
|
||||||
<gerritBuildSuccessfulCodeReviewValue>0</gerritBuildSuccessfulCodeReviewValue>
|
|
||||||
<gerritBuildFailedVerifiedValue>-1</gerritBuildFailedVerifiedValue>
|
|
||||||
<gerritBuildFailedCodeReviewValue>0</gerritBuildFailedCodeReviewValue>
|
|
||||||
<gerritBuildUnstableVerifiedValue>0</gerritBuildUnstableVerifiedValue>
|
|
||||||
<gerritBuildUnstableCodeReviewValue>-1</gerritBuildUnstableCodeReviewValue>
|
|
||||||
<silentMode>false</silentMode>
|
|
||||||
<escapeQuotes>true</escapeQuotes>
|
|
||||||
<triggerOnPatchsetUploadedEvent>true</triggerOnPatchsetUploadedEvent>
|
|
||||||
<triggerOnChangeMergedEvent>false</triggerOnChangeMergedEvent>
|
|
||||||
<triggerOnCommentAddedEvent>false</triggerOnCommentAddedEvent>
|
|
||||||
<triggerOnRefUpdatedEvent>false</triggerOnRefUpdatedEvent>
|
|
||||||
<buildStartMessage></buildStartMessage>
|
|
||||||
<buildFailureMessage>This change was unable to be automatically merged with the current state of the repository. Please rebase your change and upload a new patchset.</buildFailureMessage>
|
|
||||||
<buildSuccessfulMessage></buildSuccessfulMessage>
|
|
||||||
<buildUnstableMessage></buildUnstableMessage>
|
|
||||||
<customUrl></customUrl>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
|
@ -1,36 +0,0 @@
|
|||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
|
||||||
<spec></spec>
|
|
||||||
<gerritProjects>
|
|
||||||
<% trigger_branches.each do |trigger| %>
|
|
||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
|
||||||
<compareType>PLAIN</compareType>
|
|
||||||
<pattern><%= site %>/<%= trigger[0] %></pattern>
|
|
||||||
<branches>
|
|
||||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
|
||||||
<compareType>ANT</compareType>
|
|
||||||
<pattern><%= trigger[1] %></pattern>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
|
||||||
</branches>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
|
||||||
<% end %>
|
|
||||||
</gerritProjects>
|
|
||||||
<gerritBuildStartedVerifiedValue>0</gerritBuildStartedVerifiedValue>
|
|
||||||
<gerritBuildStartedCodeReviewValue>0</gerritBuildStartedCodeReviewValue>
|
|
||||||
<gerritBuildSuccessfulVerifiedValue>1</gerritBuildSuccessfulVerifiedValue>
|
|
||||||
<gerritBuildSuccessfulCodeReviewValue>0</gerritBuildSuccessfulCodeReviewValue>
|
|
||||||
<gerritBuildFailedVerifiedValue>-1</gerritBuildFailedVerifiedValue>
|
|
||||||
<gerritBuildFailedCodeReviewValue>0</gerritBuildFailedCodeReviewValue>
|
|
||||||
<gerritBuildUnstableVerifiedValue>0</gerritBuildUnstableVerifiedValue>
|
|
||||||
<gerritBuildUnstableCodeReviewValue>-1</gerritBuildUnstableCodeReviewValue>
|
|
||||||
<silentMode>false</silentMode>
|
|
||||||
<escapeQuotes>true</escapeQuotes>
|
|
||||||
<triggerOnPatchsetUploadedEvent>true</triggerOnPatchsetUploadedEvent>
|
|
||||||
<triggerOnChangeMergedEvent>false</triggerOnChangeMergedEvent>
|
|
||||||
<triggerOnCommentAddedEvent>false</triggerOnCommentAddedEvent>
|
|
||||||
<triggerOnRefUpdatedEvent>false</triggerOnRefUpdatedEvent>
|
|
||||||
<buildStartMessage></buildStartMessage>
|
|
||||||
<buildFailureMessage></buildFailureMessage>
|
|
||||||
<buildSuccessfulMessage></buildSuccessfulMessage>
|
|
||||||
<buildUnstableMessage></buildUnstableMessage>
|
|
||||||
<customUrl></customUrl>
|
|
||||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
|
@ -1,3 +0,0 @@
|
|||||||
<hudson.triggers.SCMTrigger>
|
|
||||||
<spec>*/15 * * * *</spec>
|
|
||||||
</hudson.triggers.SCMTrigger>
|
|
@ -1,3 +0,0 @@
|
|||||||
<hudson.triggers.TimerTrigger>
|
|
||||||
<spec>@midnight</spec>
|
|
||||||
</hudson.triggers.TimerTrigger>
|
|
Loading…
x
Reference in New Issue
Block a user