hudson.tasks
Class BuildWrapper.Environment

java.lang.Object
  extended by hudson.model.Environment
      extended by hudson.tasks.BuildWrapper.Environment
Enclosing class:
BuildWrapper

public abstract class BuildWrapper.Environment
extends Environment

Represents the environment set up by BuildWrapper.setUp(Build,Launcher,BuildListener).

It is expected that the subclasses of BuildWrapper extends this class and implements its own semantics.


Constructor Summary
BuildWrapper.Environment()
           
 
Method Summary
 boolean tearDown(AbstractBuild build, BuildListener listener)
          Runs after the Builder completes, and performs a tear down.
 boolean tearDown(Build build, BuildListener listener)
          Deprecated. since 2007-10-28. Use tearDown(AbstractBuild, BuildListener) instead.
 
Methods inherited from class hudson.model.Environment
buildEnvVars, create
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildWrapper.Environment

public BuildWrapper.Environment()
Method Detail

tearDown

public boolean tearDown(AbstractBuild build,
                        BuildListener listener)
                 throws IOException,
                        InterruptedException
Runs after the Builder completes, and performs a tear down.

This method is invoked even when the build failed, so that the clean up operation can be performed regardless of the build result (for example, you'll want to stop application server even if a build fails.) Run.getResult() in this case will return Result.FAILURE (since 1.339), and a null result indicates SUCCESS-so-far (post-build actions may still affect the final result).

Overrides:
tearDown in class Environment
Parameters:
build - The same Build object given to the set up method.
listener - The same BuildListener object given to the set up method.
Returns:
true if the build can continue, false if there was an error and the build needs to be aborted.
Throws:
IOException - terminates the build abnormally. Hudson will handle the exception and reports a nice error message.
InterruptedException
Since:
1.150

tearDown

@Deprecated
public boolean tearDown(Build build,
                                   BuildListener listener)
                 throws IOException,
                        InterruptedException
Deprecated. since 2007-10-28. Use tearDown(AbstractBuild, BuildListener) instead.

Throws:
IOException
InterruptedException


Copyright © 2004-2013. All Rights Reserved.