Package hudson.plugins.copyartifact
Class DownstreamBuildSelector
java.lang.Object
hudson.model.AbstractDescribableImpl<BuildSelector>
hudson.plugins.copyartifact.BuildSelector
hudson.plugins.copyartifact.DownstreamBuildSelector
- All Implemented Interfaces:
ExtensionPoint
,Describable<BuildSelector>
Select a build which is a downstream of a specified build.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionDownstreamBuildSelector
(String upstreamProjectName, String upstreamBuildNumber) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionRun<?,
?> getBuild
(Job<?, ?> job, EnvVars env, BuildFilter filter, Run<?, ?> parent) Find a build to copy artifacts from.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.Methods inherited from class hudson.plugins.copyartifact.BuildSelector
getArtifacts, getBuild, getSourceDirectory, isBuildResultBetterOrEqualTo
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
Method Details
-
getUpstreamProjectName
- Returns:
- upstream project name. May include variable expression.
-
getUpstreamBuildNumber
- Returns:
- upstream build number. May include variable expression.
-
getBuild
Description copied from class:BuildSelector
Find a build to copy artifacts from.- Overrides:
getBuild
in classBuildSelector
- Parameters:
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- Returns:
- Build to use, or null if no appropriate build was found
-
isSelectable
Description copied from class:BuildSelector
Should this build be selected? Override just this method to use a standard loop through completed builds, starting with the most recent.- Overrides:
isSelectable
in classBuildSelector
- Parameters:
run
- Build to checkenv
- Environment for build that is copying artifacts- Returns:
- True to select this build
-