Being able to hook branch deletion would allow cleanup of external artifacts that might be created by a pipeline (setting up staging environments for example).
Travis Cline not sure what this is asking for. Do you mean recieve the webhook from github so that it can clean things up as soon as they are removed? Or something else ?
(a something else I have wanted is for agents to cleanup workspaces ASAP after deletion to save disk, not sure if that is what you are thinking about?)
Being able to hook have arbitrary run on branch deletion would allow cleanup of external artifacts that might be created by a pipeline (setting up staging environments for example).
The GitHub Org Folders plugin is being tombstoned.
The functionality provided by the GitHub Org Folders plugin has been significantly refactored and migrated to the GitHub Branch Source plugin.
Please verify if this issue is an issue with GitHub Branch Source 2.0.0-beta-1 (available from the experimental update center now or 2.0.0 (available in early January 2017)
With GitHub Branch Source 2.0.0-beta-1 (or newer) the branch being deleted (or no longer being recognised as a project - e.g. removing Jenkinsfile) will mark the branch as a Dead Branch, which can then either be manually deleted or will be deleted on the next index (as the branch retention policy is implicit to only get applied on each index and also otherwise things like "close PR -> reopen PR -> trigger rebuild" would destroy the PR build history)
I just want to bump this up--it would be super useful to be able to hook in cleanup jobs when branches are deleted. Even if it's on a per-organization basis.
In my case I'd like to set up branch deployments for QA and tear them down again when a branch is deleted. I can make the creation steps idempotent, but not having a trigger for deletion stuff makes this significantly harder.
There is a listener for job deletion - probably from that you could work out that it was actually a branch deletion happening (ie filter the events down to branches being deleted... probably)
There is a listener for job deletion - probably from that you could work out that it was actually a branch deletion happening (ie filter the events down to branches being deleted... probably)
(remember at some level branches are just jobs in a folder, underneath it all)