This is indeed what I did: - https://groups.google.com/d/msg/jenkinsci-users/upVzT3SOZy8/N5iguMZsAgAJ
But using scripted pipelines, it looks like you cannot use try/catch within the declarative pipeline but post steps (https://jenkins.io/doc/book/pipeline/syntax/#post) but the timeout triggers a failure therefore you need to run something like pipeline { agent any options { timeout(time: 1, unit: 'SECONDS') } stages { ... } post { failure { // Catch failures and even the tiemout one } } } I don't know whether the declarative post step allows a kind of more accurate granularity about what caused that particular failure... Cheers -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a3c9c2c7-3ab8-4591-9ae2-35d7faaa9bb1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
