public abstract class RunSelector extends hudson.model.AbstractDescribableImpl<RunSelector> implements hudson.ExtensionPoint
getNextBuild(Job, RunSelectorContext)
.
use RunSelectorDescriptor
for its descriptor.Constructor and Description |
---|
RunSelector() |
Modifier and Type | Method and Description |
---|---|
String |
getDisplayName()
Returns the display name for this selector.
|
hudson.model.Run<?,?> |
getNextBuild(hudson.model.Job<?,?> job,
RunSelectorContext context)
Override this method to implement
RunSelector . |
hudson.model.Run<?,?> |
select(hudson.model.Job<?,?> job,
RunSelectorContext context) |
@CheckForNull public hudson.model.Run<?,?> select(@Nonnull hudson.model.Job<?,?> job, @Nonnull RunSelectorContext context) throws IOException, InterruptedException
job
- the job to pick a build from.context
- context for the current execution of runselector.IOException
- if an error occurs while performing the operation.InterruptedException
- if any thread interrupts the current thread.@CheckForNull public hudson.model.Run<?,?> getNextBuild(@Nonnull hudson.model.Job<?,?> job, @Nonnull RunSelectorContext context) throws IOException, InterruptedException
RunSelector
.
Use RunSelectorContext.getLastMatchBuild()
to
continue enumerating builds.
Or you can save the execution state
with RunSelectorContext.addExtension(Object)
job
- the job to pick a build from.context
- context for the current execution of runselector.IOException
- if an error occurs while performing the operation.InterruptedException
- if any thread interrupts the current thread.public String getDisplayName()
Copyright © 2016–2020. All rights reserved.