Re: Is it possible to detect TIMEOUT event and act upon it?

2018-03-19 Thread Victor Martinez
I'm afraid I do not have any other examples using the global timeout option. I hope someone else might come up with something else. Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving

Re: Is it possible to detect TIMEOUT event and act upon it?

2018-03-19 Thread Idan Adar
In declarative pipeline there is also the option for a script {} block where "traditional" Jenkins scripting can be done, so what you're suggesting can be done there. However, I'm not looking to adding the user prompt like in your example, which seems like SYSTEM depends on, in your example.

Re: Is it possible to detect TIMEOUT event and act upon it?

2018-03-19 Thread Victor Martinez
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

Re: Is it possible to detect TIMEOUT event and act upon it?

2018-03-19 Thread Idan Adar
According to the Jenkins documentation for timeout, there is an exception thrown: Executes the code inside the block with a determined time out limit. If the time limit is reached, an exception is thrown, which leads in aborting the build (unless it is caught and processed somehow). How do I

Re: Is it possible to detect TIMEOUT event and act upon it?

2018-03-19 Thread Victor Martinez
I did play with that sometime ago but I don't have access to those pipelines anymore... The below article might help you out: - https://support.cloudbees.com/hc/en-us/articles/226554067-Pipeline-How-to-add-an-input-step-with-timeout-that-continues-if-timeout-is-reached-using-a-default-value

Is it possible to detect TIMEOUT event and act upon it?

2018-03-18 Thread Idan Adar
In a declarative pipeline's Jenkinsfile it is possible to add a timeout option both global as well as override it per stage. E.g.: stage ("SonarQube analysis") { options { timeout(time: 5, unit: 'MINUTES') } steps { script { STAGE_NAME = "SonarQube analysis"