Warm tip: This article is reproduced from serverfault.com, please click

Where are the api docs/implementation of Jenkinsfile pipeline methods?

发布于 2020-11-27 17:16:34

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.

Questioner
Anentropic
Viewed
0
Andrei Kovrov 2020-11-28 12:15:42

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.

Execution flow source code you can find here and here