Merge "Properties: fix copyartifact permissions with several projects"
This commit is contained in:
commit
6c9d8ccb0c
@ -529,7 +529,8 @@ def copyartifact(parser, xml_parent, data):
|
||||
raise JenkinsJobsException("projects string must exist and "
|
||||
"not be empty")
|
||||
projectlist = XML.SubElement(copyartifact, 'projectNameList')
|
||||
XML.SubElement(projectlist, 'string').text = data.get('projects')
|
||||
for project in str(data.get('projects')).split(','):
|
||||
XML.SubElement(projectlist, 'string').text = project
|
||||
|
||||
|
||||
def batch_tasks(parser, xml_parent, data):
|
||||
|
11
tests/properties/fixtures/copyartifact-multiple.xml
Normal file
11
tests/properties/fixtures/copyartifact-multiple.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<properties>
|
||||
<hudson.plugins.copyartifact.CopyArtifactPermissionProperty plugin="copyartifact">
|
||||
<projectNameList>
|
||||
<string>foo*</string>
|
||||
<string>bar</string>
|
||||
</projectNameList>
|
||||
</hudson.plugins.copyartifact.CopyArtifactPermissionProperty>
|
||||
</properties>
|
||||
</project>
|
3
tests/properties/fixtures/copyartifact-multiple.yaml
Normal file
3
tests/properties/fixtures/copyartifact-multiple.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
properties:
|
||||
- copyartifact:
|
||||
projects: foo*,bar
|
Loading…
Reference in New Issue
Block a user