public abstract class AbstractSpecificRunSelector extends RunSelector
RunSelector
enumerates only one build.
override {getBuild(Job, RunSelectorContext)
instead.Constructor and Description |
---|
AbstractSpecificRunSelector() |
Modifier and Type | Method and Description |
---|---|
abstract hudson.model.Run<?,?> |
getBuild(hudson.model.Job<?,?> job,
RunSelectorContext context)
Override this method to implement
AbstractSpecificRunSelector . |
hudson.model.Run<?,?> |
getNextBuild(hudson.model.Job<?,?> job,
RunSelectorContext context)
Override this method to implement
RunSelector . |
getDisplayName, select
@CheckForNull public final 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)
getNextBuild
in class RunSelector
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 abstract hudson.model.Run<?,?> getBuild(@Nonnull hudson.model.Job<?,?> job, @Nonnull RunSelectorContext context) throws IOException, InterruptedException
AbstractSpecificRunSelector
.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.Copyright © 2016–2020. All rights reserved.