Merge "Added support for least load plugin."

This commit is contained in:
Jenkins 2014-02-22 06:53:27 +00:00 committed by Gerrit Code Review
commit 07fa712f50
6 changed files with 43 additions and 0 deletions

View File

@ -145,6 +145,26 @@ def github(parser, xml_parent, data):
github_url.text = data['url']
def least_load(parser, xml_parent, data):
"""yaml: least-load
Enables the Least Load Plugin.
Requires the Jenkins `Least Load Plugin.
<https://wiki.jenkins-ci.org/display/JENKINS/Least+Load+Plugin>`_
:arg bool disabled: whether or not leastload is disabled (default True)
Example::
.. literalinclude:: /../../tests/properties/fixtures/least_load002.yaml
"""
least = XML.SubElement(xml_parent,
'org.bstick12.jenkinsci.plugins.leastload.'
'LeastLoadDisabledProperty')
XML.SubElement(least, 'leastLoadDisabled').text = str(
data.get('disabled', True)).lower()
def throttle(parser, xml_parent, data):
"""yaml: throttle
Throttles the number of builds for this job.

View File

@ -87,6 +87,7 @@ setuptools.setup(
'github=jenkins_jobs.modules.properties:github',
'heavy-job=jenkins_jobs.modules.properties:heavy_job',
'inject=jenkins_jobs.modules.properties:inject',
'least-load=jenkins_jobs.modules.properties:least_load',
'ownership=jenkins_jobs.modules.properties:ownership',
'priority-sorter=jenkins_jobs.modules.properties:priority_sorter',
'promoted-build=jenkins_jobs.modules.properties:promoted_build',

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<properties>
<org.bstick12.jenkinsci.plugins.leastload.LeastLoadDisabledProperty>
<leastLoadDisabled>true</leastLoadDisabled>
</org.bstick12.jenkinsci.plugins.leastload.LeastLoadDisabledProperty>
</properties>
</project>

View File

@ -0,0 +1,3 @@
properties:
- least-load:
disabled: True

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<properties>
<org.bstick12.jenkinsci.plugins.leastload.LeastLoadDisabledProperty>
<leastLoadDisabled>false</leastLoadDisabled>
</org.bstick12.jenkinsci.plugins.leastload.LeastLoadDisabledProperty>
</properties>
</project>

View File

@ -0,0 +1,3 @@
properties:
- least-load:
disabled: False