Support for Shiningpanda's Tox Builder
Change-Id: Iebe55aeed98e73935934c036699932d70604528a Signed-off-by: Marco Nenciarini <mnencia@gmail.com>
This commit is contained in:
parent
59a8342f85
commit
0983a272c5
|
@ -1870,6 +1870,37 @@ class Builders(jenkins_jobs.modules.base.Base):
|
|||
XML.SubElement(xml_parent, 'builders')
|
||||
|
||||
|
||||
def tox(parser, xml_parent, data):
|
||||
"""yaml: tox
|
||||
Execute a tox environment. Requires the Jenkins
|
||||
:jenkins-wiki:`ShiningPanda plugin <ShiningPanda+Plugin>`.
|
||||
|
||||
:arg str configuration-file:
|
||||
Workspace relative path to tox configuration file. (default:
|
||||
tox.ini)
|
||||
|
||||
:arg bool recreate:
|
||||
Force recreation of virtual environments. (default: false)
|
||||
|
||||
Examples:
|
||||
|
||||
.. literalinclude::
|
||||
/../../tests/builders/fixtures/tox-default.yaml
|
||||
:language: yaml
|
||||
|
||||
.. literalinclude::
|
||||
/../../tests/builders/fixtures/tox.yaml
|
||||
:language: yaml
|
||||
|
||||
"""
|
||||
tox = XML.SubElement(
|
||||
xml_parent, 'jenkins.plugins.shiningpanda.builders.ToxBuilder')
|
||||
configuration_file = XML.SubElement(tox, 'toxIni')
|
||||
configuration_file.text = data.get('configuration-file', 'tox.ini')
|
||||
recreate = XML.SubElement(tox, 'recreate')
|
||||
recreate.text = str(data.get('recreate', False)).lower()
|
||||
|
||||
|
||||
def shining_panda(parser, xml_parent, data):
|
||||
"""yaml: shining-panda
|
||||
Execute a command inside various python environments. Requires the Jenkins
|
||||
|
|
|
@ -79,6 +79,7 @@ jenkins_jobs.builders =
|
|||
sonatype-clm=jenkins_jobs.modules.builders:sonatype_clm
|
||||
ssh-builder=jenkins_jobs.modules.builders:ssh_builder
|
||||
system-groovy=jenkins_jobs.modules.builders:system_groovy
|
||||
tox=jenkins_jobs.modules.builders:tox
|
||||
trigger-builds=jenkins_jobs.modules.builders:trigger_builds
|
||||
trigger-remote=jenkins_jobs.modules.builders:trigger_remote
|
||||
jenkins_jobs.reporters =
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<jenkins.plugins.shiningpanda.builders.ToxBuilder>
|
||||
<toxIni>tox.ini</toxIni>
|
||||
<recreate>false</recreate>
|
||||
</jenkins.plugins.shiningpanda.builders.ToxBuilder>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,2 @@
|
|||
builders:
|
||||
- tox
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<jenkins.plugins.shiningpanda.builders.ToxBuilder>
|
||||
<toxIni>alternate-tox.ini</toxIni>
|
||||
<recreate>true</recreate>
|
||||
</jenkins.plugins.shiningpanda.builders.ToxBuilder>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,4 @@
|
|||
builders:
|
||||
- tox:
|
||||
configuration-file: alternate-tox.ini
|
||||
recreate: true
|
Loading…
Reference in New Issue