I know how to specify a timeout of a Jenkins job globally:
options
{
timeout(time: 10, unit: 'MINUTES')
}
But I want to have 2 Timeout conditions, similar to this:
options
{
timeout(time: 10, unit: 'MINUTES')
timeout(activity: true, time: 2, unit: 'MINUTES')
}
This makes sense. There is a timeout if there is no activity, but even if there is activity, the build should terminal after some time.
But specifying it twice is not valid. Is there a way to specify 2 timeouts?