Pipeline retry step

17 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Graham Hay

ungelesen,
08.02.2021, 09:15:2008.02.21
an Jenkins Users
https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#retry-retry-the-body-up-to-n-times

Can someone clarify for me what retry(1) will do? Will that run the step twice, if it fails? Or does the count include the original attempt? (I tried to find the source code, but didn't even know where to start).

Thanks,

Graham

gma...@gmail.com

ungelesen,
08.02.2021, 09:19:4908.02.21
an jenkins...@googlegroups.com

Hi Graham,

I have no ide … but why not test it?

It’s quite straightforward:

 

Retry(1) {

   Error(“This will fail … but how many times you will see this text?”)

}

 

Cheers,

Gianluca.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4f974b15-a376-47ff-b6ea-199715275225n%40googlegroups.com.

Graham Hay

ungelesen,
08.02.2021, 10:56:2508.02.21
an jenkins...@googlegroups.com
Good idea, thanks.

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/Ku2uzb00f2A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/00c401d6fe25%249371c480%24ba554d80%24%40gmail.com.
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten