On Sun, Apr 8, 2018 at 12:06 PM, Jeff Wilson <geek.macb...@gmail.com> wrote:
> I have a long running build action
> that involves sending commands to a REST API, getting the results, parsing
> them and writing out artifacts that could be used by a later build step.

Most similar functions use `SynchronousNonBlockingStepExecution` and
abort on Jenkins restart under the guess that the time window here is
pretty small and a restart in the middle is unlikely. Perhaps you can
do better if you want to put in the effort, but I am not sure how—if
you are making a REST call from the Jenkins JVM, then a restart will
of course break that TCP connection.

Simpler options:

· Use `SynchronousNonBlockingStepExecution` but have users wrap the
step in `retry` if they care enough about a single build passing. (I
have not personally tested the combination.)
· Do not bother with a step at all, or a Jenkins plugin for that
matter. Write a little Python program or whatever that does the same
thing and have people call it via `sh`/`bat`. Kills a whole flock of
birds with one little stone.

You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to