Custom action on job/build delete

7 views
Skip to first unread message

Federico Giovanardi

unread,
May 28, 2019, 8:26:50 AM5/28/19
to Jenkins Users
Hello,

we've a pipeline job which is uploading artifacts to a remote server. It's there any way to
hook a custom action or a script to the job's delete event to purge the remote data when the
job gets deleted by "Discard old build"

Best regards.
Federico

Baptiste Mathus

unread,
May 31, 2019, 7:39:13 AM5/31/19
to jenkins...@googlegroups.com
Inside a plugin, yes and very easily. (ItemListener.onDeleted https://github.com/jenkinsci/jenkins/blob/892bdf124ebd3b8a386c7e019ce4ebe74262b819/core/src/main/java/hudson/model/listeners/ItemListener.java#L101)

I don't think I've seen something to do that available as an existing feature on the /user side/.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c8aa93b7-21ce-41c5-9f79-e28b3d8f7d7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages