I found out the root cause to this, "Discard Build" is a plugin and just 
calls the delete method. There isn't any field in Run listener to identify 
source it is coming from, as in my case whether the user is doing it or 
some plugin calling it. Would be great if we include some field for this 
and set it on user operation.

On Thursday, 3 March 2016 10:16:11 UTC+5:30, Shashank Bhargav wrote:
>
> Thanks Baptiste Mathus for your quick response. 
>
> Also, How do I check if the delete step is triggered by user or Jenkins? 
> For ex : In cases of "Discard Build" set for job, builds are deleted by 
> backend process of jenkins and not by user. I need to identify this, could 
> you please help. 
>
> On Wednesday, 2 March 2016 11:03:13 UTC+5:30, Shashank Bhargav wrote:
>>
>> I need to perform some custom operations in my plugin when user does 
>> "Delete Build". How do I do this?
>>
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a0170436-2bd7-4941-a104-f2cdaa613d93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to