Class DownstreamBuildSelector

All Implemented Interfaces:
ExtensionPoint, Describable<BuildSelector>

public class DownstreamBuildSelector extends BuildSelector
Select a build which is a downstream of a specified build.
  • Constructor Details

    • DownstreamBuildSelector

      @DataBoundConstructor public DownstreamBuildSelector(String upstreamProjectName, String upstreamBuildNumber)
      Constructor.
      Parameters:
      upstreamProjectName - Upstream project name.
      upstreamBuildNumber - Upstream build number.
  • Method Details

    • getUpstreamProjectName

      public String getUpstreamProjectName()
      Returns:
      upstream project name. May include variable expression.
    • getUpstreamBuildNumber

      public String getUpstreamBuildNumber()
      Returns:
      upstream build number. May include variable expression.
    • getBuild

      public Run<?,?> getBuild(Job<?,?> job, EnvVars env, BuildFilter filter, 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(Run<?,?> run, 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