Property to disable job resume on Jenkins restart

Change-Id: I1bb63ecc02b9f74e59aec70811eaca7c082665be
This commit is contained in:
Alexander Evseev 2019-04-03 16:07:31 +03:00 committed by Alexander Evseev
parent ced1495a96
commit 43f002c65a
3 changed files with 26 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<properties>
<org.jenkinsci.plugins.workflow.job.properties.DisableResumeJobProperty/>
</properties>
</project>

View File

@ -0,0 +1,2 @@
properties:
- disable-resume