Hook between build status and process terminating.

Hello everyone.

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.

For example:

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.

Comment actions Permalink


It should be possible via an agent-side plugin implementing jetbrains.buildServer.agent.AgentLifeCycleAdapter#beforeBuildInterrupted method.

Comment actions Permalink

Thank you a lot, this is exactly what i was searching for.


Please sign in to leave a comment.