jenkinsci/docker-plugin — pull request #95 by jglick (2014-09-24 19:02:48+00:00)
Title: Using OnceRetentionPolicy from durable-task

Background [here](https://trello.com/c/ejXnTaxo/113-elastic-cloud-interop) and [here](https://rm.cloudbees.com/issues/2408).

This patch simplifies the Docker plugin a little by using a standardized “one-shot” cloud retention strategy now defined in the `durable-task` plugin. This strategy has the additional behavior of leaving the slave online if a `Queue.Executable` finishes which has indicated that it expects to be immediately replaced by a follow-up task which must run on the same node (typically in the same workspace); or that even if killed by a shutdown, an equivalent to the current task will expect to run after Jenkins restarts.

If the patch seems too radical, a more conservative change would be to check for `ContinuableExecutable` in `DockerComputer` before setting `haveWeRunAnyJobs`, which would thus be guarantee to have no effect except when dealing with plugins which also depend on `durable-task`.

By the way there was a fair amount of logic in `DockerComputer` whose purpose I was unsure of and which I left alone.