Merge "BugFix: Target field in Job-DSL plugin was not being populated"
This commit is contained in:
commit
29e8456a4c
|
@ -2182,7 +2182,9 @@ def dsl(parser, xml_parent, data):
|
|||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: /../../tests/builders/fixtures/dsl.yaml
|
||||
.. literalinclude:: /../../tests/builders/fixtures/dsl001.yaml
|
||||
:language: yaml
|
||||
.. literalinclude:: /../../tests/builders/fixtures/dsl002.yaml
|
||||
:language: yaml
|
||||
|
||||
"""
|
||||
|
@ -2194,7 +2196,7 @@ def dsl(parser, xml_parent, data):
|
|||
XML.SubElement(dsl, 'scriptText').text = data.get('script-text')
|
||||
XML.SubElement(dsl, 'usingScriptText').text = 'true'
|
||||
elif data.get('target'):
|
||||
XML.SubElement(dsl, 'target').text = data.get('target')
|
||||
XML.SubElement(dsl, 'targets').text = data.get('target')
|
||||
XML.SubElement(dsl, 'usingScriptText').text = 'false'
|
||||
else:
|
||||
raise MissingAttributeError(['script-text', 'target'])
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<javaposse.jobdsl.plugin.ExecuteDslScripts>
|
||||
<targets>jobs/**/*.groovy</targets>
|
||||
<usingScriptText>false</usingScriptText>
|
||||
<ignoreExisting>true</ignoreExisting>
|
||||
<removedJobAction>DISABLE</removedJobAction>
|
||||
<removedViewAction>DELETE</removedViewAction>
|
||||
<lookupStrategy>SEED_JOB</lookupStrategy>
|
||||
<additionalClasspath>*.jar</additionalClasspath>
|
||||
</javaposse.jobdsl.plugin.ExecuteDslScripts>
|
||||
</builders>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
builders:
|
||||
- dsl:
|
||||
target: "jobs/**/*.groovy"
|
||||
ignore-existing: "true"
|
||||
removed-job-action: "DISABLE"
|
||||
removed-view-action: "DELETE"
|
||||
lookup-strategy: "SEED_JOB"
|
||||
additional-classpath: "*.jar"
|
Loading…
Reference in New Issue