Cleanup on 'Delete Project' (deleting a Jenkins Job)

911 views
Skip to first unread message

pallen

unread,
Jan 15, 2016, 11:50:12 AM1/15/16
to Jenkins Developers
Hi Guys,

How do you hook into the Delete Project event when a Jenkins Job is deleted?

I want to allow the p4 (SCM) plugin to cleanup the workspace (and associated Perforce metadata).  Initially I thought that 'processWorkspaceBeforeDeletion' method from 'SCM' would get called, but that is only on a 'Workspace' --> 'Wipe Out Current Workspace' event.

Thanks,
Paul

Kanstantsin Shautsou

unread,
Jan 15, 2016, 1:30:02 PM1/15/16
to Jenkins Developers
Listener.onDeleted() for items afair

Daniel Beck

unread,
Jan 15, 2016, 1:31:59 PM1/15/16
to jenkin...@googlegroups.com

On 15.01.2016, at 17:50, pallen <pal...@perforce.com> wrote:

> How do you hook into the Delete Project event when a Jenkins Job is deleted?

http://javadoc.jenkins-ci.org/hudson/model/listeners/ItemListener.html#onDeleted%28hudson.model.Item%29

Paul Allen

unread,
Jan 18, 2016, 5:44:19 AM1/18/16
to jenkin...@googlegroups.com
Thank you.
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/848103BB-3252-47DE-9BC0-86F951D6949A%40beckweb.net.
> For more options, visit https://groups.google.com/d/optout.



--------------------------------------------------------------------------------
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed. If
you have received this email in error please notify the system manager. Please
note that any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of Perforce Software. Finally,
the recipient should check this email and any attachments for the presence of
viruses. Perforce Software accepts no liability for any damage caused by any
virus transmitted by this email.

Perforce Software UK Ltd is registered in England and Wales as company no.
3816019 at the following address: West Forest Gate, Wellington Road, Wokingham,
RG40 2AT, UK
--------------------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages