hudson.ivy
Class IvyBuildTrigger
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Notifier
hudson.ivy.IvyBuildTrigger
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.DependecyDeclarer, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep
public class IvyBuildTrigger
- extends hudson.tasks.Notifier
- implements hudson.model.DependecyDeclarer
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
| Nested classes/interfaces inherited from class hudson.tasks.Publisher |
hudson.tasks.Publisher.DescriptorExtensionListImpl |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Nested classes/interfaces inherited from interface hudson.tasks.BuildStep |
hudson.tasks.BuildStep.PublisherList |
| Fields inherited from interface hudson.tasks.BuildStep |
BUILDERS, PUBLISHERS |
|
Method Summary |
void |
buildDependencyGraph(hudson.model.AbstractProject owner,
hudson.model.DependencyGraph graph)
Build the dependency graph based on the Ivy ModuleDescriptor for this trigger. |
org.apache.ivy.Ivy |
getIvy()
|
java.lang.String |
getIvyConfName()
|
java.lang.String |
getIvyFile()
|
hudson.tasks.BuildStepMonitor |
getRequiredMonitorService()
|
boolean |
isTriggerWhenUnstable()
|
boolean |
needsToRunAfterFinalized()
IvyBuildTrigger is only responsible for helping to build dependency graphs based on Ivy settings and configuration. |
boolean |
perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
The BuildStep perform implementation. |
| Methods inherited from class hudson.tasks.Notifier |
getDescriptor |
| Methods inherited from class hudson.tasks.Publisher |
all, getProjectAction, prebuild |
| Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer |
getProjectAction, getProjectActions, perform, prebuild |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hudson.tasks.BuildStep |
getProjectAction, getProjectActions, prebuild |
DESCRIPTOR
@Extension
public static final IvyBuildTrigger.DescriptorImpl DESCRIPTOR
- The descriptor of this trigger. It is annotated as an Extension so Hudson can automatically register this
instance as associated with IvyBuildTrigger.
IvyBuildTrigger
@DataBoundConstructor
public IvyBuildTrigger(java.lang.String ivyFile,
java.lang.String ivyConfName,
boolean triggerWhenUnstable)
- Constructor
- Parameters:
ivyFile - the ivy.xml file path within the workspaceivyConfName - the Ivy configuration name to usetriggerWhenUnstable - 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(java.lang.String ivyFile,
java.lang.String ivyConfName)
- Deprecated. use
IvyBuildTrigger(String, String, boolean) instead
- Constructor
- Parameters:
ivyFile - the ivy.xml file path within the workspaceivyConfName - the Ivy configuration name to use
getIvyFile
public java.lang.String getIvyFile()
- Returns:
- the ivy.xml file path within the workspace
getIvyConfName
public java.lang.String getIvyConfName()
- Returns:
- the Ivy configuration name used
isTriggerWhenUnstable
public boolean isTriggerWhenUnstable()
getIvy
public org.apache.ivy.Ivy getIvy()
- Returns:
- the Ivy instance based on the
ivyConfName
- Throws:
java.text.ParseException
java.io.IOException
perform
public boolean perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws java.lang.InterruptedException,
java.io.IOException
- The BuildStep perform implementation. It performs a conditional recomputation of the project ModuleDescriptor.
- Specified by:
perform in interface hudson.tasks.BuildStep- Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
- Returns:
- always returns true so the build can continue
- Throws:
java.lang.InterruptedException
java.io.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 hudson.tasks.Publisher
- Returns:
- always returns true meaning that the perform method will not run until the build is marked complete
- See Also:
perform(AbstractBuild, Launcher, BuildListener)
getRequiredMonitorService
public hudson.tasks.BuildStepMonitor getRequiredMonitorService()
- Specified by:
getRequiredMonitorService in interface hudson.tasks.BuildStep
buildDependencyGraph
public void buildDependencyGraph(hudson.model.AbstractProject owner,
hudson.model.DependencyGraph graph)
- Build the dependency graph based on the Ivy ModuleDescriptor for this trigger.
- Specified by:
buildDependencyGraph in interface hudson.model.DependecyDeclarer
- Parameters:
owner - the project this trigger belongs tograph - the DependencyGraph to which computed dependencies are added
Copyright © 2010. All Rights Reserved.