|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.Run.RunExecution
hudson.model.Run.Runner
hudson.model.AbstractBuild.AbstractBuildExecution
public abstract class AbstractBuild.AbstractBuildExecution
Field Summary | |
---|---|
protected Launcher |
launcher
Since configuration can be changed while a build is in progress, create a launcher once and stick to it for the entire build duration. |
protected BuildListener |
listener
Output/progress of this build goes here. |
Constructor Summary | |
---|---|
AbstractBuild.AbstractBuildExecution()
|
Method Summary | |
---|---|
void |
cleanUp(BuildListener listener)
Performs final clean up action. |
protected Launcher |
createLauncher(BuildListener listener)
Creates a Launcher that this build will use. |
protected WorkspaceList.Lease |
decideWorkspace(Node n,
WorkspaceList wsl)
Allocates the workspace from WorkspaceList . |
void |
defaultCheckout()
|
protected abstract Result |
doRun(BuildListener listener)
The portion of a build that is specific to a subclass of AbstractBuild
goes here. |
protected Node |
getCurrentNode()
Returns the current Node on which we are building. |
Launcher |
getLauncher()
|
BuildListener |
getListener()
|
protected boolean |
perform(BuildStep bs,
BuildListener listener)
Calls a build step. |
protected void |
performAllBuildStep(BuildListener listener,
Iterable<? extends BuildStep> buildSteps,
boolean phase)
Deprecated. as of 1.356 Use performAllBuildSteps(BuildListener, Iterable, boolean) |
protected void |
performAllBuildStep(BuildListener listener,
Map<?,? extends BuildStep> buildSteps,
boolean phase)
Deprecated. as of 1.356 Use performAllBuildSteps(BuildListener, Map, boolean) |
protected boolean |
performAllBuildSteps(BuildListener listener,
Iterable<? extends BuildStep> buildSteps,
boolean phase)
Runs all the given build steps, even if one of them fail. |
protected boolean |
performAllBuildSteps(BuildListener listener,
Map<?,? extends BuildStep> buildSteps,
boolean phase)
|
void |
post(BuildListener listener)
Performs the post-build action. |
protected abstract void |
post2(BuildListener listener)
|
protected boolean |
preBuild(BuildListener listener,
Collection<? extends BuildStep> steps)
|
protected boolean |
preBuild(BuildListener listener,
Iterable<? extends BuildStep> steps)
|
protected boolean |
preBuild(BuildListener listener,
Map<?,? extends BuildStep> steps)
|
Result |
run(BuildListener listener)
Performs the main build and returns the status code. |
Methods inherited from class hudson.model.Run.RunExecution |
---|
getAttributes, getBuild, getProject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Launcher launcher
protected BuildListener listener
Constructor Detail |
---|
public AbstractBuild.AbstractBuildExecution()
Method Detail |
---|
protected final Node getCurrentNode()
Node
on which we are building.
public Launcher getLauncher()
public BuildListener getListener()
protected WorkspaceList.Lease decideWorkspace(Node n, WorkspaceList wsl) throws InterruptedException, IOException
WorkspaceList
.
n
- Passed in for the convenience. The node where the build is running.wsl
- Passed in for the convenience. The returned path must be registered to this object.
InterruptedException
IOException
public Result run(BuildListener listener) throws Exception
Run.RunExecution
run
in class Run.RunExecution
Exception
- exception will be recorded and the build will be considered a failure.protected Launcher createLauncher(BuildListener listener) throws IOException, InterruptedException
Launcher
that this build will use. This can be overridden by derived types
to decorate the resulting Launcher
.
listener
- Always non-null. Connected to the main build output.
IOException
InterruptedException
public void defaultCheckout() throws IOException, InterruptedException
IOException
InterruptedException
protected abstract Result doRun(BuildListener listener) throws Exception, Run.RunnerAbortedException
AbstractBuild
goes here.
Exception
Run.RunnerAbortedException
protected abstract void post2(BuildListener listener) throws Exception
Exception
post(BuildListener)
public final void post(BuildListener listener) throws Exception
Run.RunExecution
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()
.
post
in class Run.RunExecution
Exception
public void cleanUp(BuildListener listener) throws Exception
Run.RunExecution
This method is called after Run.RunExecution.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.
cleanUp
in class Run.RunExecution
Exception
protected final void performAllBuildStep(BuildListener listener, Map<?,? extends BuildStep> buildSteps, boolean phase) throws InterruptedException, IOException
performAllBuildSteps(BuildListener, Map, boolean)
InterruptedException
IOException
protected final boolean performAllBuildSteps(BuildListener listener, Map<?,? extends BuildStep> buildSteps, boolean phase) throws InterruptedException, IOException
InterruptedException
IOException
protected final void performAllBuildStep(BuildListener listener, Iterable<? extends BuildStep> buildSteps, boolean phase) throws InterruptedException, IOException
performAllBuildSteps(BuildListener, Iterable, boolean)
InterruptedException
IOException
protected final boolean performAllBuildSteps(BuildListener listener, Iterable<? extends BuildStep> buildSteps, boolean phase) throws InterruptedException, IOException
phase
- true for the post build processing, and false for the final "run after finished" execution.
InterruptedException
IOException
protected final boolean perform(BuildStep bs, BuildListener listener) throws InterruptedException, IOException
InterruptedException
IOException
protected final boolean preBuild(BuildListener listener, Map<?,? extends BuildStep> steps)
protected final boolean preBuild(BuildListener listener, Collection<? extends BuildStep> steps)
protected final boolean preBuild(BuildListener listener, Iterable<? extends BuildStep> steps)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |