Being able to 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).

          [JENKINS-37907] Include abililty to hook branch deletion.

          Travis Cline created issue -

          Michael Neale added a comment -

          tmc 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?)

          Michael Neale added a comment - tmc 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?)
          Travis Cline made changes -
          Description Original: 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). New: Being able to 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).

          Travis Cline added a comment -

          michaelneale - in my use case i have jobs creating external running environments and removing them on branch deletion is desirable.

          Travis Cline added a comment - michaelneale - in my use case i have jobs creating external running environments and removing them on branch deletion is desirable.

          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)

          Stephen Connolly added a comment - 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)
          Stephen Connolly made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          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)

          Stephen Connolly added a comment - 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)
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-40606 [ JENKINS-40606 ]
          Peter Novotnak made changes -
          Component/s New: github-branch-source-plugin [ 20858 ]

          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.

          Peter Novotnak added a comment - 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.

            kohsuke Kohsuke Kawaguchi
            tmc Travis Cline
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: