hudson.plugins.helpers
Class BuildProxy

java.lang.Object
  extended by hudson.plugins.helpers.BuildProxy
All Implemented Interfaces:
java.io.Serializable

public final class BuildProxy
extends java.lang.Object
implements java.io.Serializable

Proxy for the key build information.

See Also:
Serialized Form

Method Summary
static boolean doPerform(Ghostwriter ghostwriter, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener)
          (Call from master) Invokes the ghostwriter on the master and slave nodes for this build.
static boolean doPerform(Ghostwriter ghostwriter, hudson.maven.MavenBuildProxy mavenBuildProxy, org.apache.maven.project.MavenProject pom, hudson.model.BuildListener listener)
          (Call from slave) Invokes the ghostwriter on the master and slave nodes for this build.
 java.util.List<AbstractBuildAction<hudson.model.AbstractBuild<?,?>>> getActions()
          Getter for property 'actions'.
 hudson.FilePath getArtifactsDir()
          Gets the directory (on the master) where the artifacts are archived.
 hudson.FilePath getBuildRootDir()
          Root directory of the AbstractBuild on the master.
 hudson.FilePath getExecutionRootDir()
          Returns the root directory of the checked-out module on the machine where the build executes.
 hudson.FilePath getProjectRootDir()
          Root directory of the AbstractProject on the master.
 hudson.model.Result getResult()
          Getter for property 'result'.
 java.util.Calendar getTimestamp()
          When the build is scheduled.
 boolean isContinueBuild()
          Getter for property 'continueBuild'.
 void setContinueBuild(boolean continueBuild)
          Setter for property 'continueBuild'.
 void setResult(hudson.model.Result result)
          Setter for property 'result'.
 void updateBuild(hudson.model.AbstractBuild<?,?> build)
          (Designed for execution from the master) Updates the build with the results that were reported to this proxy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doPerform

public static boolean doPerform(Ghostwriter ghostwriter,
                                hudson.model.AbstractBuild<?,?> build,
                                hudson.model.BuildListener listener)
                         throws java.io.IOException,
                                java.lang.InterruptedException
(Call from master) Invokes the ghostwriter on the master and slave nodes for this build.

Parameters:
ghostwriter - The ghostwriter that will be doing the work for the publisher.
build - The build.
listener - The build listener.
Returns:
true if the build can continue.
Throws:
java.io.IOException - on IOException.
java.lang.InterruptedException - on InterruptedException.

updateBuild

public void updateBuild(hudson.model.AbstractBuild<?,?> build)
(Designed for execution from the master) Updates the build with the results that were reported to this proxy.

Parameters:
build - The build to update.

doPerform

public static boolean doPerform(Ghostwriter ghostwriter,
                                hudson.maven.MavenBuildProxy mavenBuildProxy,
                                org.apache.maven.project.MavenProject pom,
                                hudson.model.BuildListener listener)
                         throws java.lang.InterruptedException,
                                java.io.IOException
(Call from slave) Invokes the ghostwriter on the master and slave nodes for this build.

Parameters:
ghostwriter - The ghostwriter that will be doing the work for the publisher.
mavenBuildProxy - The build (proxy).
pom - The maven pom.
listener - The build listener.
Returns:
true if the build can continue.
Throws:
java.io.IOException - on IOException.
java.lang.InterruptedException - on InterruptedException.

getActions

public java.util.List<AbstractBuildAction<hudson.model.AbstractBuild<?,?>>> getActions()
Getter for property 'actions'.

Returns:
Value for property 'actions'.

getArtifactsDir

public hudson.FilePath getArtifactsDir()
Gets the directory (on the master) where the artifacts are archived.

Returns:
the directory (on the master) where the artifacts are archived.

getBuildRootDir

public hudson.FilePath getBuildRootDir()
Root directory of the AbstractBuild on the master.

Files related to the AbstractBuild should be stored below this directory.

Returns:
Root directory of the AbstractBuild on the master.

getExecutionRootDir

public hudson.FilePath getExecutionRootDir()
Returns the root directory of the checked-out module on the machine where the build executes.

This is usually where pom.xml, build.xml and so on exists.

Returns:
Returns the root directory of the checked-out module on the machine where the build executes.

getProjectRootDir

public hudson.FilePath getProjectRootDir()
Root directory of the AbstractProject on the master.

Files related to the AbstractProject should be stored below this directory.

Returns:
Root directory of the AbstractProject on the master.

getResult

public hudson.model.Result getResult()
Getter for property 'result'.

Returns:
Value for property 'result'.

setResult

public void setResult(hudson.model.Result result)
Setter for property 'result'.

Parameters:
result - Value to set for property 'result'.

getTimestamp

public java.util.Calendar getTimestamp()
When the build is scheduled.

Returns:
The time when the build started executing.

isContinueBuild

public boolean isContinueBuild()
Getter for property 'continueBuild'.

Returns:
Value for property 'continueBuild'.

setContinueBuild

public void setContinueBuild(boolean continueBuild)
Setter for property 'continueBuild'.

Parameters:
continueBuild - Value to set for property 'continueBuild'.


Copyright © 2010. All Rights Reserved.