Merge "Convert jclouds example to unit test"
This commit is contained in:
commit
6190a2407b
@ -1075,20 +1075,11 @@ def jclouds(registry, xml_parent, data):
|
||||
:arg bool stop-on-terminate: Whether or not to suspend instead of terminate
|
||||
the instance (default false).
|
||||
|
||||
Example::
|
||||
Example:
|
||||
|
||||
.. literalinclude:: /../../tests/wrappers/fixtures/jclouds001.yaml
|
||||
:language: yaml
|
||||
|
||||
wrappers:
|
||||
- jclouds:
|
||||
single-use: True
|
||||
instances:
|
||||
- jenkins-dev-slave:
|
||||
cloud-name: mycloud1
|
||||
count: 1
|
||||
stop-on-terminate: True
|
||||
- jenkins-test-slave:
|
||||
cloud-name: mycloud2
|
||||
count: 2
|
||||
stop-on-terminate: False
|
||||
"""
|
||||
if 'instances' in data:
|
||||
buildWrapper = XML.SubElement(
|
||||
|
22
tests/wrappers/fixtures/jclouds001.xml
Normal file
22
tests/wrappers/fixtures/jclouds001.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<buildWrappers>
|
||||
<jenkins.plugins.jclouds.compute.JCloudsBuildWrapper>
|
||||
<instancesToRun>
|
||||
<jenkins.plugins.jclouds.compute.InstancesToRun>
|
||||
<templateName>jenkins-dev-slave</templateName>
|
||||
<cloudName>mycloud1</cloudName>
|
||||
<count>1</count>
|
||||
<suspendOrTerminate>true</suspendOrTerminate>
|
||||
</jenkins.plugins.jclouds.compute.InstancesToRun>
|
||||
<jenkins.plugins.jclouds.compute.InstancesToRun>
|
||||
<templateName>jenkins-test-slave</templateName>
|
||||
<cloudName>mycloud2</cloudName>
|
||||
<count>2</count>
|
||||
<suspendOrTerminate>false</suspendOrTerminate>
|
||||
</jenkins.plugins.jclouds.compute.InstancesToRun>
|
||||
</instancesToRun>
|
||||
</jenkins.plugins.jclouds.compute.JCloudsBuildWrapper>
|
||||
<jenkins.plugins.jclouds.compute.JCloudsOneOffSlave/>
|
||||
</buildWrappers>
|
||||
</project>
|
12
tests/wrappers/fixtures/jclouds001.yaml
Normal file
12
tests/wrappers/fixtures/jclouds001.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
wrappers:
|
||||
- jclouds:
|
||||
single-use: True
|
||||
instances:
|
||||
- jenkins-dev-slave:
|
||||
cloud-name: mycloud1
|
||||
count: 1
|
||||
stop-on-terminate: True
|
||||
- jenkins-test-slave:
|
||||
cloud-name: mycloud2
|
||||
count: 2
|
||||
stop-on-terminate: False
|
Loading…
x
Reference in New Issue
Block a user