Code execution when a branch is removed in a Jenkins multi-branch pipe

I have a Jenkins that uses a project with several branches . That is, when a new branch is created in the repository, Jenkins will automatically automatically create a new task for the branch and delete that task when the branch is deleted.

Now I want to run the code when deleting a branch in order to clean up the test environments created when creating the branch. Is this a way to do this?

+7
jenkins jenkins-pipeline
source share
1 answer

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

+2
source share

All Articles