Property to disable job resume on Jenkins restart
Change-Id: I1bb63ecc02b9f74e59aec70811eaca7c082665be
This commit is contained in:
parent
ced1495a96
commit
43f002c65a
@ -1199,6 +1199,24 @@ def docker_container(registry, xml_parent, data):
|
||||
xml_docker, data, mapping, fail_required=True)
|
||||
|
||||
|
||||
def disable_resume(registry, xml_parent, data):
|
||||
"""yaml: disable-resume
|
||||
Do not allow the pipeline to resume if the master restarts
|
||||
Requires the Jenkins :jenkins-wiki:`Pipeline Job Plugin
|
||||
<Pipeline+Job+Plugin>`.
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude::
|
||||
/../../tests/properties/fixtures/disable-resume.yaml
|
||||
:language: yaml
|
||||
|
||||
"""
|
||||
XML.SubElement(xml_parent,
|
||||
'org.jenkinsci.plugins.workflow.job.properties.'
|
||||
'DisableResumeJobProperty')
|
||||
|
||||
|
||||
class Properties(jenkins_jobs.modules.base.Base):
|
||||
sequence = 20
|
||||
|
||||
|
6
tests/properties/fixtures/disable-resume.xml
Normal file
6
tests/properties/fixtures/disable-resume.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<properties>
|
||||
<org.jenkinsci.plugins.workflow.job.properties.DisableResumeJobProperty/>
|
||||
</properties>
|
||||
</project>
|
2
tests/properties/fixtures/disable-resume.yaml
Normal file
2
tests/properties/fixtures/disable-resume.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
properties:
|
||||
- disable-resume
|
Loading…
x
Reference in New Issue
Block a user