5

With Jenkins, if I delete a view, I want to delete the view's jobs also.

Is there a way to do it properly ?

LaurentY
  • 7,495
  • 3
  • 37
  • 55
Youssouf Maiga
  • 6,701
  • 7
  • 26
  • 42

1 Answers1

9

Before deleting your view: in "Manage Jenkins"->"Script Console", run this script:

Jenkins.instance.getView("MyView").items.each { item ->
    println "deleting $item.name"
    item.delete()
}

After that, the view will be empty -- delete it then.

Alex O
  • 7,746
  • 2
  • 25
  • 38