Package hudson.ivy

Class IvyBuildTrigger

All Implemented Interfaces:
ExtensionPoint, Describable<Publisher>, BuildStep, DependencyDeclarer

public class IvyBuildTrigger extends Notifier implements DependencyDeclarer
Trigger the build of other project based on the Ivy dependency management system.
Author:
jmetcalf@dev.java.net, martinficker@dev.java.net, hibou@dev.java.net, tbingaman@dev.java.net
  • Field Details

    • DESCRIPTOR

      @Extension public static final IvyBuildTrigger.DescriptorImpl DESCRIPTOR
      The descriptor of this trigger. It is annotated as an Extension so Jenkins can automatically register this instance as associated with IvyBuildTrigger.
  • Constructor Details

    • IvyBuildTrigger

      @DataBoundConstructor public IvyBuildTrigger(String ivyFile, String ivyConfName, String ivyPropertiesFile, boolean triggerWhenUnstable, boolean useUpstreamParameters)
      Constructor
      Parameters:
      ivyFile - the ivy.xml file path within the workspace
      ivyConfName - the Ivy configuration name to use
      ivyPropertiesFile - the Ivy properties file path within the workspace
      triggerWhenUnstable - true if this build should be triggered even when an upstream build in Unstable. false if this build should be triggered only when an upstream build is Successful.
    • IvyBuildTrigger

      @Deprecated public IvyBuildTrigger(String ivyFile, String ivyConfName)
      Constructor
      Parameters:
      ivyFile - the ivy.xml file path within the workspace
      ivyConfName - the Ivy configuration name to use
  • Method Details

    • getIvyPropertiesFile

      public String getIvyPropertiesFile()
    • getIvyFile

      public String getIvyFile()
      Returns:
      the ivy.xml file path within the workspace
    • getIvyConfName

      public String getIvyConfName()
      Returns:
      the Ivy configuration name used
    • isTriggerWhenUnstable

      public boolean isTriggerWhenUnstable()
    • isUseUpstreamParameters

      public boolean isUseUpstreamParameters()
    • getIvy

      public org.apache.ivy.Ivy getIvy(File localFilePath, String propertyFile)
      Returns:
      the Ivy instance based on the ivyConfName
    • perform

      public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException
      The BuildStep perform implementation. It performs a conditional recomputation of the project ModuleDescriptor.
      Specified by:
      perform in interface BuildStep
      Overrides:
      perform in class BuildStepCompatibilityLayer
      Returns:
      always returns true so the build can continue
      Throws:
      InterruptedException
      IOException
    • needsToRunAfterFinalized

      public boolean needsToRunAfterFinalized()
      IvyBuildTrigger is only responsible for helping to build dependency graphs based on Ivy settings and configuration. It never alters build status and its execution time should not be included in build time.
      Overrides:
      needsToRunAfterFinalized in class Publisher
      Returns:
      always returns true meaning that the perform method will not run until the build is marked complete
      See Also:
    • getRequiredMonitorService

      public BuildStepMonitor getRequiredMonitorService()
      Specified by:
      getRequiredMonitorService in interface BuildStep
    • buildDependencyGraph

      public void buildDependencyGraph(AbstractProject owner, DependencyGraph graph)
      Build the dependency graph based on the Ivy ModuleDescriptor for this trigger.
      Specified by:
      buildDependencyGraph in interface DependencyDeclarer
      Parameters:
      owner - the project this trigger belongs to
      graph - the DependencyGraph to which computed dependencies are added