Package hudson.tasks
Class BuildWrapper.Environment
- java.lang.Object
-
- hudson.model.Environment
-
- hudson.tasks.BuildWrapper.Environment
-
- Enclosing class:
- BuildWrapper
public abstract class BuildWrapper.Environment extends Environment
Represents the environment set up byBuildWrapper.setUp(Build,Launcher,BuildListener)
.It is expected that the subclasses of
BuildWrapper
extends this class and implements its own semantics.
-
-
Constructor Summary
Constructors Constructor Description Environment()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
tearDown(AbstractBuild build, BuildListener listener)
Runs after theBuilder
completes, and performs a tear down.boolean
tearDown(Build build, BuildListener listener)
Deprecated.since 2007-10-28.-
Methods inherited from class hudson.model.Environment
buildEnvVars, create
-
-
-
-
Method Detail
-
tearDown
public boolean tearDown(AbstractBuild build, BuildListener listener) throws IOException, InterruptedException
Runs after theBuilder
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 classEnvironment
- Parameters:
build
- The sameBuild
object given to the set up method.listener
- The sameBuildListener
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. UsetearDown(AbstractBuild, BuildListener)
instead.- Throws:
IOException
InterruptedException
-
-