-
New Feature
-
Resolution: Fixed
-
Major
-
None
WatchYourStep (in test sources) is actually similar to something that has been requested: a way to wait until a named file appears in the workspace, or until the content of a file has changed, etc. All these things could be handled by a step like this:
waitForCond { readFile 'flag' }
or
waitForCond { readFile('flag') == 'ready' }
Roughly similar to retry, it would run its block, and if the block either throws an exception or returns false, it would run it again. Or it might be more intuitive to expect only a boolean return value and force the first example to be written as
waitForCond { try { readFile 'flag' return true } catch (FileNotFoundException _) { return false } }
(Even if an exception is permitted as a synonym for false, InterruptedException should be thrown up.)
Unlike retry there would not need to be any limit to the number of retries, and there would be an exponentially increasing delay between successive retries: run the first time immediately, then retry after 100ms, then continue to multiply the delay by a factor of 1.3 or something like that (perhaps up to some maximum delay like DurableTaskStep has).
- depends on
-
JENKINS-27129 More consistent use of PauseAction
- Open
-
JENKINS-26163 StepExecutionIterator omits outer executions
- Resolved
-
JENKINS-26148 Incorrect implementation of RetryStepExecution.stop
- Closed
- is related to
-
JENKINS-27127 wait/notify steps
- Open