Executing code when a branch is removed in Jenkins' multi branch pipeline

我是研究僧i 提交于 2019-12-20 12:36:52

问题


I have a Jenkins that uses multi branch project. That is, when a new branch is created to repository, Jenkins automatically will automatically create a new job for the branch, and remove that job when the branch is removed.

Now, I'd like to run some code when the branch is removed, to clear testing environments that were created when the branch was created. It there a way to do this?


回答1:


Not without writing plugin code I think. If you are interested, the relevant extension point would be OrphanedItemStrategy from the cloudbees-folder plugin.



来源:https://stackoverflow.com/questions/37701289/executing-code-when-a-branch-is-removed-in-jenkins-multi-branch-pipeline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!