hudson.model
Class Run.RunExecution

java.lang.Object
  extended by hudson.model.Run.RunExecution
Direct Known Subclasses:
Run.Runner
Enclosing class:
Run<JobT extends Job<JobT,RunT>,RunT extends Run<JobT,RunT>>

public abstract class Run.RunExecution
extends Object

Object that lives while the build is executed, to keep track of things that are needed only during the build.


Constructor Summary
Run.RunExecution()
           
 
Method Summary
abstract  void cleanUp(BuildListener listener)
          Performs final clean up action.
 Map<Object,Object> getAttributes()
          Bag of stuff to allow plugins to store state for the duration of a build without persisting it.
 RunT getBuild()
           
 JobT getProject()
           
abstract  void post(BuildListener listener)
          Performs the post-build action.
abstract  Result run(BuildListener listener)
          Performs the main build and returns the status code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Run.RunExecution

public Run.RunExecution()
Method Detail

run

public abstract Result run(BuildListener listener)
                    throws Exception,
                           Run.RunnerAbortedException
Performs the main build and returns the status code.

Throws:
Exception - exception will be recorded and the build will be considered a failure.
Run.RunnerAbortedException

post

public abstract void post(BuildListener listener)
                   throws Exception
Performs the post-build action.

This method is called after the main portion of the build is completed. This is a good opportunity to do notifications based on the result of the build. When this method is called, the build is not really finalized yet, and the build is still considered in progress --- for example, even if the build is successful, this build still won't be picked up by Job.getLastSuccessfulBuild().

Throws:
Exception

cleanUp

public abstract void cleanUp(@Nonnull
                             BuildListener listener)
                      throws Exception
Performs final clean up action.

This method is called after post(BuildListener), after the build result is fully finalized. This is the point where the build is already considered completed.

Among other things, this is often a necessary pre-condition before invoking other builds that depend on this build.

Throws:
Exception

getBuild

public RunT getBuild()

getProject

public JobT getProject()

getAttributes

public Map<Object,Object> getAttributes()
Bag of stuff to allow plugins to store state for the duration of a build without persisting it.

Since:
1.473


Copyright © 2004-2013. All Rights Reserved.