How to delete Views under Jenkins without affecting existing jobs

前端 未结 2 970
别跟我提以往
别跟我提以往 2021-02-15 23:56

I want to delete Views under Jenkins without affecting the Jobs under the view. I am asking this since I am not able to enter same name of View even after deleting this as an Ad

相关标签:
2条回答
  • 2021-02-16 00:14

    For deleting a view (and not touching any jobs therein) use

    def view = Jenkins.instance.getView("MyView")
    Jenkins.instance.deleteView( view )
    

    Your code deletes the jobs in the view (but not the view itself), so be careful with that : )

    0 讨论(0)
  • 2021-02-16 00:29

    go to view --> edit view --> unchecked all jobs on that view --> Save --> Delete View

    0 讨论(0)
提交回复
热议问题