In Jenkins you can easily create a list view with the Job DSL
listView("myView") {
jobs {
regex(".*")
}
}
but if you try to create a list view within a folder, the folder will be created but not the view
folder("someFolder")
listView("someFolder/myView") {
jobs {
regex(".*")
}
}
Is there a way to accomplish this?
This occurs when a Job DSL performs operations in this order:
The reason this happens is that views live in the config file for a folder. When you re-generate a folder, it deletes any configured views for that folder.
To fix this issue in my case, I removed any duplicate folder creation so that each folder was only created once.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With