e.g. I found some narrative docs like:
https://www.jenkins.io/doc/pipeline/tour/running-multiple-steps/#timeouts-retries-and-more
They show there are two methods timeout
and retry
, but the arguments they take are not detailed except via some example code. (it's very frustrating that keywords highlighted in the docs, like retry
, aren't linked to some definitional docs somewhere).
There is this https://javadoc.jenkins.io/ but AFAICT there is no search and I did not manage to find the relevant part in there yet. Can someone point me in the right direction?
Furthermore I would like to look at the implementation, to understand what condition retry
actually retries under (when exceptions are raised? when some failure value is returned?). I have tried code search on GitHub https://github.com/jenkinsci/jenkins but could not find the relevant code.
I'm using a Jenkinsfile declarative pipeline with some custom methods defined via a shared library, trying to understand how it will interact with some of these Jenkins builtins.
Documentation about retry
and timeout
mentioned in pipeline's options and stage's options.
retry and timeout are workflow steps and they are parts of workflow-basic-steps-plugin
.
Thanks, I eventually found the code on GitHub last night, same as you have linked to. I also found this alternative link for
retry
andtimeout
docs which is a bit more explicit about their arguments: jenkins.io/doc/pipeline/steps/workflow-basic-steps (although it wasn't very clear to me at first glance if these docs were applicable to declarative pipeline but it's the sameworkflow-basic-steps
plugin)