public abstract class BuildSelector extends AbstractDescribableImpl<BuildSelector> implements ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
BuildSelector() |
Modifier and Type | Method and Description |
---|---|
protected VirtualFile |
getArtifacts(Run<?,?> sourceBuild,
PrintStream console)
Load artifacts from a given build.
|
Run<?,?> |
getBuild(Job<?,?> job,
EnvVars env,
BuildFilter filter)
Deprecated.
|
Run<?,?> |
getBuild(Job<?,?> job,
EnvVars env,
BuildFilter filter,
Run<?,?> parent)
Find a build to copy artifacts from.
|
protected FilePath |
getSourceDirectory(Run<?,?> src,
PrintStream console)
Deprecated.
rather override
getArtifacts(hudson.model.Run<?, ?>, java.io.PrintStream) |
protected static boolean |
isBuildResultBetterOrEqualTo(Run<?,?> run,
Result resultToTest)
Wrapper for
Result.isBetterOrEqualTo(Result) with null checks. |
protected boolean |
isSelectable(Run<?,?> run,
EnvVars env)
Should this build be selected? Override just this method to use a standard
loop through completed builds, starting with the most recent.
|
getDescriptor
public Run<?,?> getBuild(Job<?,?> job, EnvVars env, BuildFilter filter, Run<?,?> parent)
job
- Source projectenv
- Environment for build that is copying artifactsfilter
- Additional filter; returned result should return true (return null otherwise)parent
- Build to which artifacts are being copied@Deprecated public Run<?,?> getBuild(Job<?,?> job, EnvVars env, BuildFilter filter)
job
- Source projectenv
- Environment for build that is copying artifactsfilter
- Additional filter; returned result should return true (return null otherwise)protected boolean isSelectable(Run<?,?> run, EnvVars env)
run
- Build to checkenv
- Environment for build that is copying artifactsprotected static boolean isBuildResultBetterOrEqualTo(Run<?,?> run, Result resultToTest)
Result.isBetterOrEqualTo(Result)
with null checks.
Returns false
if run
is null
or run
is still running.run
- Build to test.resultToTest
- Result to test.false
if run
is null
or run
is still running.Result.isBetterOrEqualTo(Result)
@CheckForNull protected VirtualFile getArtifacts(Run<?,?> sourceBuild, PrintStream console) throws IOException, InterruptedException
sourceBuild
- a build which may have associated artifactsconsole
- a way to print messagesIOException
InterruptedException
@Deprecated protected FilePath getSourceDirectory(Run<?,?> src, PrintStream console) throws IOException, InterruptedException
getArtifacts(hudson.model.Run<?, ?>, java.io.PrintStream)
IOException
InterruptedException
Copyright © 2016–2022. All rights reserved.