I have a problem writing simple TeamCity hook plugin.
Maybe not even problem, but misunderstanding.
Is it possible to catch Overtime/Fail of task build with AgentLifeCycleAdapter before process will be terminated?
We have a great debug-script for limited purposes that is expanding and that needs to be run when task failed or overtimed, but it requires process to stay alive.
1) Build is in progress and my hook is monitoring status of a task.
2) Build is failed, i'm catching event, running remote debug-script it collects all it's needed info and quits.
3) Process terminates.
Is it even possible and what is a simple logic?
Thank you guys for your answers.