Class Build<P extends BaseBuildableProject<P,B>,B extends Build<P,B>>

  extended by hudson.model.AbstractModelObject
      extended by hudson.model.Actionable
          extended by hudson.model.Run<P,R>
              extended by hudson.model.AbstractBuild<P,B>
                  extended by hudson.model.Build<P,B>
All Implemented Interfaces:
ExtensionPoint, DescriptorByNameOwner, ModelObject, PersistenceRoot, Queue.Executable, Saveable, SearchableModelObject, SearchItem, AccessControlled, Comparable<B>, Runnable
Direct Known Subclasses:
FreeStyleBuild, MatrixRun

public abstract class Build<P extends BaseBuildableProject<P,B>,B extends Build<P,B>>
extends AbstractBuild<P,B>

A build of a Project.

Steps of a build

Roughly speaking, a Build goes through the following stages:

SCM checkout
Hudson decides which directory to use for a build, then the source code is checked out
Pre-build steps
Everyone gets their BuildStep.prebuild(AbstractBuild, BuildListener) invoked to indicate that the build is starting
Build wrapper set up
BuildWrapper.setUp(AbstractBuild, Launcher, BuildListener) is invoked. This is normally to prepare an environment for the build.
Builder runs
BuildStepCompatibilityLayer.perform(AbstractBuild, Launcher, BuildListener) is invoked. This is where things that are useful to users happen, like calling Ant, Make, etc.
Recorder runs
BuildStepCompatibilityLayer.perform(AbstractBuild, Launcher, BuildListener) is invoked. This is normally to record the output from the build, such as test results.
Notifier runs
BuildStepCompatibilityLayer.perform(AbstractBuild, Launcher, BuildListener) is invoked. This is normally to send out notifications, based on the results determined so far.

And beyond that, the build is considered complete, and from then on Build object is there to keep the record of what happened in this build.

Kohsuke Kawaguchi

Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.AbstractBuild
Nested classes/interfaces inherited from class hudson.model.Run
Run.Artifact, Run.ArtifactList, Run.KeepLogBuildBadge, Run.RedirectUp, Run.RunnerAbortedException, Run.Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
Field Summary
Fields inherited from class hudson.model.Run
Fields inherited from interface hudson.model.Saveable
Method Summary
 void run()
          Invoked by Executor to performs a build.
Methods inherited from class hudson.model.AbstractBuild
delete, doStop, due, getBuildVariableResolver, getBuildVariables, getBuiltOn, getBuiltOnStr, getChangeSet, getCulprits, getDependencyChanges, getDownstreamBuilds, getDownstreamBuilds, getDownstreamRelationship, getEnvironment, getHudsonVersion, getModuleRoot, getModuleRoots, getProject, getSensitiveBuildVariables, getTestResultAction, getTransitiveUpstreamBuilds, getUpstreamBuilds, getUpstreamRelationship, getUpstreamRelationshipBuild, getUpUrl, getWhyKeepLog, getWorkspace, hasChangeSetComputed, hasParticipant
Methods inherited from class hudson.model.Run
addAction, checkPermission, compareTo, deleteArtifacts, doArtifact, doBuildNumber, doBuildStatus, doBuildTimestamp, doConfigSubmit, doConsoleText, doDoDelete, doProgressiveLog, doSubmitDescription, doToggleLogKeep, fromExternalizableId, getAbsoluteUrl, getACL, getApi, getArtifacts, getArtifactsDir, getArtifactsUpTo, getBadgeActions, getBuildStatusSummary, getBuildStatusUrl, getCause, getCauses, getCharacteristicEnvVars, getCharset, getDescription, getDescriptorByName, getDisplayName, getDuration, getDurationString, getDynamic, getEnvironment, getEnvVars, getEstimatedDuration, getExecutor, getExternalizableId, getFullDisplayName, getFullName, getHasArtifacts, getIconColor, getId, getIDFormatter, getLog, getLog, getLogFile, getLogInputStream, getLogReader, getLogText, getNextBuild, getNumber, getParent, getPreviousBuild, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getResult, getRootDir, getSearchUrl, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTruncatedDescription, getUrl, hasCustomDisplayName, hasntStartedYet, hasPermission, isBuilding, isKeepLog, isLogUpdated, keepLog, keepLog, save, setDescription, setDisplayName, setResult, toString, writeLogTo
Methods inherited from class hudson.model.Actionable
getAction, getAction, getActions, getActions
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.model.Queue.Executable
getEstimatedDuration, getParent, toString

Method Detail


public void run()
Description copied from class: AbstractBuild
Invoked by Executor to performs a build.

Specified by:
run in interface Queue.Executable
Specified by:
run in interface Runnable
Specified by:
run in class AbstractBuild<P extends BaseBuildableProject<P,B>,B extends Build<P,B>>

Copyright © 2004-2013 Hudson. All Rights Reserved.