hudson.plugins.copyartifact
Class TriggeredBuildSelector

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<BuildSelector>
      extended by hudson.plugins.copyartifact.BuildSelector
          extended by hudson.plugins.copyartifact.TriggeredBuildSelector
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<BuildSelector>

public class TriggeredBuildSelector
extends BuildSelector

Copy artifacts from the build that triggered this build.

Author:
Alan Harder

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static hudson.model.Descriptor<BuildSelector> DESCRIPTOR
           
 
Constructor Summary
TriggeredBuildSelector(boolean fallback)
           
 
Method Summary
 hudson.model.Run<?,?> getBuild(hudson.model.Job<?,?> job, hudson.EnvVars env, BuildFilter filter, hudson.model.Run<?,?> parent)
          Find a build to copy artifacts from.
 boolean isFallbackToLastSuccessful()
           
protected  boolean isSelectable(hudson.model.Run<?,?> run, hudson.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
getBuild
 
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTOR

@Extension(ordinal=25.0)
public static final hudson.model.Descriptor<BuildSelector> DESCRIPTOR
Constructor Detail

TriggeredBuildSelector

@DataBoundConstructor
public TriggeredBuildSelector(boolean fallback)
Method Detail

isFallbackToLastSuccessful

public boolean isFallbackToLastSuccessful()

getBuild

public hudson.model.Run<?,?> getBuild(hudson.model.Job<?,?> job,
                                      hudson.EnvVars env,
                                      BuildFilter filter,
                                      hudson.model.Run<?,?> parent)
Description copied from class: BuildSelector
Find a build to copy artifacts from.

Overrides:
getBuild in class BuildSelector
Parameters:
job - Source project
env - Environment for build that is copying artifacts
filter - 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

protected boolean isSelectable(hudson.model.Run<?,?> run,
                               hudson.EnvVars env)
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 class BuildSelector
Parameters:
run - Build to check
env - Environment for build that is copying artifacts
Returns:
True to select this build


Copyright © 2004-2012 Hudson. All Rights Reserved.