oleg-nenashev on master
Add ability to collapse the Fol… Merge pull request #72 from ref… (compare)
oleg-nenashev on ownership-1.0
branch-api
, and to test it, i'd need a mock implementation
@LocalData
I Create a project in jenkins (done)
I assign this project to a collegue (owner) (done)
He has the visibility only on this project (done with the restriction access plugin)
He is able to assign other collegues to his project ( I want to do this with the ownership plugin, but I can not )
=> The only way that I find until now is to add the other collegues on the matrix table. I don't want to do this, because the matrix table will become very complicated and heavy.
I just want to put the owner of the project in the table and the owner can add and choose the rights to give to the futur user of the project.
Thanks for your answer
Dan
So, there is no any job dsl api call right now to set ownership for Folder, which means that there could be two possible solutions for that:
<org.jenkinsci.plugins.ownership.model.folders.FolderOwnershipProperty plugin="ownership@0.10.0">
<ownership>
<ownershipEnabled>true</ownershipEnabled>
<primaryOwnerId>admin</primaryOwnerId>
<coownersIds class="sorted-set">
<string>daspilker</string>
</coownersIds>
</ownership>
</org.jenkinsci.plugins.ownership.model.folders.FolderOwnershipProperty>
This solution could work for most of the cases, but when you run following job dsl script
folder('MyTestFolder') {
configure { folder ->
folder / 'properties' / 'org.jenkinsci.plugins.ownership.model.folders.FolderOwnershipProperty' / 'ownership' {
primaryOwnerId('admin')
ownershipEnabled('true')
coownersIds(class:"sorted-set")
}
}
}
Only<org.jenkinsci.plugins.ownership.model.folders.FolderOwnershipProperty plugin="ownership@0.10.0">
part will be created in config.xml
folder('MyTestFolder')
before above script