hudson.matrix
Class MatrixBuild

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.Actionable
          extended by hudson.model.Run<P,R>
              extended by hudson.model.AbstractBuild<MatrixProject,MatrixBuild>
                  extended by hudson.matrix.MatrixBuild
All Implemented Interfaces:
ExtensionPoint, DescriptorByNameOwner, ModelObject, PersistenceRoot, Queue.Executable, Saveable, SearchableModelObject, SearchItem, AccessControlled, Comparable<MatrixBuild>, Runnable, ModelObjectWithContextMenu, OnMaster

public class MatrixBuild
extends AbstractBuild<MatrixProject,MatrixBuild>

Build of MatrixProject.

Author:
Kohsuke Kawaguchi

Nested Class Summary
 class MatrixBuild.MatrixBuildExecution
          Object that lives from the start of MatrixBuild execution to its end.
 class MatrixBuild.RunPtr
          Used by view to render a ball for MatrixRun.
 
Nested classes/interfaces inherited from class hudson.model.AbstractBuild
AbstractBuild.AbstractBuildExecution, AbstractBuild.AbstractRunner, AbstractBuild.DependencyChange
 
Nested classes/interfaces inherited from class hudson.model.Run
Run.Artifact, Run.ArtifactList, Run.KeepLogBuildBadge, Run.RedirectUp, Run.RunExecution, Run.Runner, Run.RunnerAbortedException, Run.Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.MenuItem
 
Field Summary
 
Fields inherited from class hudson.model.AbstractBuild
buildEnvironments
 
Fields inherited from class hudson.model.Run
ARTIFACTS, charset, DELETE, description, duration, FEED_ADAPTER, FEED_ADAPTER_LATEST, ID_FORMATTER, LIST_CUTOFF, number, ORDER_BY_DATE, PERMISSIONS, project, result, state, timestamp, TREE_CUTOFF, UPDATE, XSTREAM, XSTREAM2
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
MatrixBuild(MatrixProject job)
           
MatrixBuild(MatrixProject job, Calendar timestamp)
           
MatrixBuild(MatrixProject project, File buildDir)
           
 
Method Summary
 void doDoDeleteAll(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Deletes the build and all matrix configurations in this build when the button is pressed.
 MatrixBuild getBaseBuild()
          Returns the base MatrixBuild that this build originates from.
 Fingerprint.RangeSet getDownstreamRelationship(AbstractProject that)
          Gets the dependency relationship from this build (as the source) and that project (as the sink.)
 Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
           
 MatrixRun getExactRun(Combination c)
          Like getRun(Combination), but do not approximate the result by earlier execution of the given combination (which is done for partial rebuild of the matrix.)
 List<MatrixRun> getExactRuns()
          Returns all MatrixRuns for exactly this MatrixBuild.
 Layouter<MatrixBuild.RunPtr> getLayouter()
           
 MatrixRun getRun(Combination c)
          Gets the MatrixRun in this build that corresponds to the given combination.
 List<MatrixRun> getRuns()
          Returns all MatrixRuns for this MatrixBuild.
 String getWhyKeepLog()
          If Run.isKeepLog() returns true, returns a short, human-readable sentence that explains why it's being kept.
 boolean isLinkedBy(MatrixBuild b)
           
 boolean isPartial()
          True if this build didn't do a full build and it is depending on the result of the previous build.
 Object readResolve()
           
 void run()
          Invoked by Executor to performs a build.
 void setBaseBuild(MatrixBuild baseBuild)
          Sets the base build from which this build is derived.
 
Methods inherited from class hudson.model.AbstractBuild
doStop, doStop, due, getAggregatedTestResultAction, getBuildFingerprints, getBuildVariableResolver, getBuildVariables, getBuiltOn, getBuiltOnStr, getChangeSet, getCulprits, getDependencyChanges, getDownstreamBuilds, getDownstreamBuilds, getEnvironment, getEnvironments, getHudsonVersion, getModuleRoot, getModuleRoots, getNextBuild, getPersistentActions, getPreviousBuild, getProject, getRootBuild, getSensitiveBuildVariables, getTestResultAction, getTransitiveUpstreamBuilds, getUpstreamBuilds, getUpstreamRelationship, getUpstreamRelationshipBuild, getUpUrl, getWorkspace, hasChangeSetComputed, hasParticipant, setBuiltOnStr, setWorkspace
 
Methods inherited from class hudson.model.Run
_this, addAction, canToggleLogKeep, checkPermission, compareTo, delete, deleteArtifacts, doArtifact, doBuildNumber, doBuildStatus, doBuildTimestamp, doConfigSubmit, doConsoleText, doDoDelete, doProgressiveLog, doSubmitDescription, doToggleLogKeep, execute, fromExternalizableId, getAbsoluteUrl, getACL, getApi, getArtifacts, getArtifactsDir, getArtifactsUpTo, getBadgeActions, getBuildStatusSummary, getBuildStatusUrl, getCause, getCauses, getCharacteristicEnvVars, getCharset, getDescription, getDescriptorByName, getDisplayName, getDuration, getDurationString, getEnvironment, getEnvVars, getEstimatedDuration, getExecutor, getExternalizableId, getFullDisplayName, getHasArtifacts, getIconColor, getId, getIDFormatter, getLog, getLog, getLogFile, getLogInputStream, getLogReader, getLogText, getNumber, getOneOffExecutor, getParent, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getResult, getRootDir, getSearchUrl, getStartTimeInMillis, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTransientActions, getTruncatedDescription, getUrl, hasCustomDisplayName, hasntStartedYet, hasPermission, isBuilding, isKeepLog, isLogUpdated, keepLog, keepLog, makeSearchIndex, onEndBuilding, onLoad, onStartBuilding, reload, run, save, setDescription, setDisplayName, setResult, submit, toString, writeLogTo, writeWholeLogTo
 
Methods inherited from class hudson.model.Actionable
doContextMenu, getAction, getAction, getActions, getActions
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.model.Queue.Executable
getEstimatedDuration, getParent, toString
 

Constructor Detail

MatrixBuild

public MatrixBuild(MatrixProject job)
            throws IOException
Throws:
IOException

MatrixBuild

public MatrixBuild(MatrixProject job,
                   Calendar timestamp)

MatrixBuild

public MatrixBuild(MatrixProject project,
                   File buildDir)
            throws IOException
Throws:
IOException
Method Detail

readResolve

public Object readResolve()

doDoDeleteAll

public void doDoDeleteAll(org.kohsuke.stapler.StaplerRequest req,
                          org.kohsuke.stapler.StaplerResponse rsp)
                   throws IOException,
                          javax.servlet.ServletException
Deletes the build and all matrix configurations in this build when the button is pressed.

Throws:
IOException
javax.servlet.ServletException

getLayouter

public Layouter<MatrixBuild.RunPtr> getLayouter()

setBaseBuild

public void setBaseBuild(MatrixBuild baseBuild)
Sets the base build from which this build is derived.

Since:
1.416

getBaseBuild

public MatrixBuild getBaseBuild()
Returns the base MatrixBuild that this build originates from.

If this build is a partial build, unexecuted MatrixRuns are delegated to this build number.


getRun

public MatrixRun getRun(Combination c)
Gets the MatrixRun in this build that corresponds to the given combination.


getExactRun

public MatrixRun getExactRun(Combination c)
Like getRun(Combination), but do not approximate the result by earlier execution of the given combination (which is done for partial rebuild of the matrix.)


getRuns

@Exported
public List<MatrixRun> getRuns()
Returns all MatrixRuns for this MatrixBuild.


getExactRuns

public List<MatrixRun> getExactRuns()
Returns all MatrixRuns for exactly this MatrixBuild.

Unlike getRuns(), this method excludes those runs that didn't run and got inherited.

Since:
1.413

getWhyKeepLog

public String getWhyKeepLog()
Description copied from class: Run
If Run.isKeepLog() returns true, returns a short, human-readable sentence that explains why it's being kept.

Overrides:
getWhyKeepLog in class AbstractBuild<MatrixProject,MatrixBuild>

isLinkedBy

public boolean isLinkedBy(MatrixBuild b)
Returns:
True if another MatrixBuild build (passed as a parameter) depends on this build.
Since:
1.481

isPartial

public boolean isPartial()
True if this build didn't do a full build and it is depending on the result of the previous build.


getDynamic

public Object getDynamic(String token,
                         org.kohsuke.stapler.StaplerRequest req,
                         org.kohsuke.stapler.StaplerResponse rsp)
Overrides:
getDynamic in class Run<MatrixProject,MatrixBuild>

run

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<MatrixProject,MatrixBuild>

getDownstreamRelationship

public Fingerprint.RangeSet getDownstreamRelationship(AbstractProject that)
Description copied from class: AbstractBuild
Gets the dependency relationship from this build (as the source) and that project (as the sink.)

Overrides:
getDownstreamRelationship in class AbstractBuild<MatrixProject,MatrixBuild>
Returns:
range of build numbers that represent which downstream builds are using this build. The range will be empty if no build of that project matches this (or there is no Fingerprinter.FingerprintAction), but it'll never be null.


Copyright © 2004-2013. All Rights Reserved.