Package hudson.matrix
Class MatrixConfiguration
java.lang.Object
- All Implemented Interfaces:
ExtensionPoint,BuildableItem,BuildableItemWithBuildWrappers,DescriptorByNameOwner,Item,ModelObject,PersistenceRoot,Queue.NonBlockingTask,SubTask,Queue.Task,ResourceActivity,Saveable,SearchableModelObject,SearchItem,AccessControlled,Maven.ProjectWithMaven,LazyBuildMixIn.LazyLoadingJob<MatrixConfiguration,,MatrixRun> Loadable,ModelObjectWithChildren,ModelObjectWithContextMenu,ParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,,MatrixRun> ITask,SCMTriggerItem,TriggeredItem,OnMaster,HasWidgets,org.kohsuke.stapler.HttpDeletable,org.kohsuke.stapler.StaplerOverridable,org.kohsuke.stapler.StaplerProxy
public class MatrixConfiguration
extends Project<MatrixConfiguration,MatrixRun>
implements SCMTriggerItem, Queue.NonBlockingTask
One configuration of
MatrixProject.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class hudson.model.AbstractProject
AbstractProject.AbstractProjectDescriptor, AbstractProject.BecauseOfBuildInProgress, AbstractProject.BecauseOfDownstreamBuildInProgress, AbstractProject.BecauseOfUpstreamBuildInProgress, AbstractProject.LabelValidatorNested classes/interfaces inherited from class hudson.model.Job
Job.BuildNumberAssigner, Job.DefaultBuildNumberAssigner, Job.LastItemListener, Job.SubItemBuildsLocationImplNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface org.kohsuke.stapler.HttpDeletable
org.kohsuke.stapler.HttpDeletable.HttpDeletableDispatcherNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemTypeNested classes/interfaces inherited from interface jenkins.triggers.SCMTriggerItem
SCMTriggerItem.SCMTriggerItems -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanOn Cygwin, path names cannot be longer than 256 chars.Fields inherited from class hudson.model.AbstractProject
ABORT, blockBuildWhenDownstreamBuilding, blockBuildWhenUpstreamBuilding, BUILD_NOW_TEXT, builds, disabled, transientActions, triggersFields inherited from class hudson.model.Job
HISTORY_ADAPTER, nextBuildNumber, properties, runIdMigratorFields inherited from class hudson.model.AbstractItem
description, displayName, name, PRONOUN, SKIP_PERMISSION_CHECK, TASK_NOUN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprotected voidvoiddelete()voiddoConfigure(org.kohsuke.stapler.StaplerResponse2 rsp) final org.kohsuke.stapler.HttpResponseGet the actual combination of the axes values for thisMatrixConfigurationgetEnvironment(Node node, TaskListener listener) getJDK()intBuild numbers are always synchronized with the parent.getPublisher(Descriptor<Publisher> descriptor) intSinceMatrixConfigurationis always invoked fromMatrixRunonce and just once, there's no point in having a quiet period.getScm()intInherit the value from the parent.Inherit the value from the parent.booleanReturns true if this configuration is a configuration currently in use today (as opposed to the ones that are there only to keep the past record.)booleanbooleanfinal booleanfinal voidmakeDisabled(boolean b) protected MatrixRunnewBuild()voidbooleanscheduleBuild(ParametersAction parameters) Deprecated.booleanscheduleBuild(ParametersAction parameters, Cause c) Deprecated.booleanscheduleBuild(List<? extends Action> actions, Cause c) Starts the build with the actions that are passed in.voidsetBuildDiscarder(BuildDiscarder logRotator) Deprecated.Value is controlled byMatrixProject.voidsetConcurrentBuild(boolean b) voidDeprecated.Not supported.final booleanprotected voidMethods inherited from class hudson.model.Project
addPublisher, asItem, createTransientActions, getResourceActivities, getSCMs, getSCMTrigger, inferMavenInstallation, isFingerprintConfigured, removePublisher, submit, submitMethods inherited from class hudson.model.AbstractProject
_getRuns, addProperty, addToList, addTrigger, blockBuildWhenDownstreamBuilding, blockBuildWhenUpstreamBuilding, buildDescribable, buildDescribable, checkAbortPermission, checkout, createExecutable, disable, doBuild, doBuildWithParameters, doCheckRetryCount, doConfigSubmit, doDoWipeOutWorkspace, doPolling, doWs, enable, findNearest, findNearest, getActions, getAssignedLabelString, getAuthToken, getBuild, getBuildByNumber, getBuildingDownstream, getBuildingUpstream, getBuildNowText, getBuildTriggerUpstreamProjects, getCauseOfBlockage, getCustomWorkspace, getDelay, getDownstreamProjects, getDownstreamProjectsForApi, getEstimatedDurationCandidates, getFirstBuild, getHasCustomQuietPeriod, getIconColor, getLastBuild, getLastBuiltOn, getLazyBuildMixIn, getModuleRoot, getModuleRoots, getNearestBuild, getNearestOldBuild, getProminentActions, getQueueItem, getRelationship, getRelevantLabels, getResourceList, getRootProject, getSameNodeConstraint, getSomeBuildWithWorkspace, getSomeWorkspace, getSubTasks, getTransitiveDownstreamProjects, getTransitiveUpstreamProjects, getTrigger, getTriggers, getUpstreamProjects, getUpstreamProjectsForApi, getWorkspace, getWorkspaceResource, hasAbortPermission, hasCustomScmCheckoutRetryCount, hasParticipant, isBuildable, isInQueue, loadBuild, makeSearchIndex, onCreatedFromScratch, performDelete, poll, pollSCMChanges, removeFromList, removeRun, removeTrigger, resolveForCLI, save, scheduleBuild, scheduleBuild2, scheduleBuild2, scheduleBuild2, scheduleBuild2, scheduleBuild2, schedulePolling, setAssignedLabel, setAssignedNode, setBlockBuildWhenDownstreamBuilding, setBlockBuildWhenUpstreamBuilding, setCustomWorkspace, setDisabled, setQuietPeriod, setScm, setScmCheckoutStrategy, triggersMethods inherited from class hudson.model.Job
checkRename, createHistoryWidget, doBuildStatus, doChildrenContextMenu, doChildrenContextMenu, doDescription, doDoRename, doRssAll, doRssChangelog, doRssFailed, fastUpdateNextBuildNumber, getACL, getAllJobs, getAllProperties, getBuildDir, getBuildForCLI, getBuildHealth, getBuildHealthReports, getBuilds, getBuilds, getBuildsAsMap, getBuildsByTimestamp, getBuildStatusIconClassName, getBuildStatusUrl, getBuildTimeGraph, getCharacteristicEnvVars, getDynamic, getDynamic, getEstimatedDuration, getLastBuildsOverThreshold, getLastCompletedBuild, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getLastUnstableBuild, getLastUnsuccessfulBuild, getLogRotator, getNewBuilds, getOverrides, getPermalinks, getProperties, getProperty, getProperty, getSearchIcon, getTimeline, isBuilding, isHoldOffBuildUntilSave, isKeepDependencies, isLogUpdated, isNameEditable, logRotate, movedTo, onCopiedFrom, removeProperty, removeProperty, renameTo, saveNextBuildNumber, setLogRotator, supportsLogRotator, updateNextBuildNumberMethods inherited from class hudson.model.AbstractItem
delete, delete, doCheckNewName, doConfigDotXml, doConfigDotXml, doConfirmRename, doDoDelete, doDoDelete, doReload, doSetName, doSubmitDescription, doSubmitDescription, getAbsoluteUrl, getApi, getConfigFile, getDescription, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getRelativeDisplayNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getTarget, getTaskNoun, getUrl, load, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXml, writeConfigDotXml, writeReplaceMethods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getAllActions, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, getACL, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.model.BuildableItem
scheduleBuild, scheduleBuildMethods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByNameMethods inherited from interface jenkins.widgets.HasWidgets
getWidget, getWidgetsMethods inherited from interface jenkins.model.queue.ITask
hasAbortPermission, hasReadPermissionMethods inherited from interface hudson.model.Item
getAbsoluteUrl, getAllJobs, getFullDisplayName, getFullName, getName, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, onCreatedFromScratch, saveMethods inherited from interface jenkins.model.ParameterizedJobMixIn.ParameterizedJob
doBuild, doBuild, doBuildWithParameters, doBuildWithParameters, doCancelQueue, doEnable, getParameterizedJobMixIn, isParameterized, scheduleBuild, scheduleBuildMethods inherited from interface hudson.model.PersistenceRoot
getRootDirMethods inherited from interface hudson.model.Queue.Task
checkAbortPermission, getAffinityKey, getCauseOfBlockage, getDefaultAuthentication, getDefaultAuthentication, getDefaultAuthentication2, getDefaultAuthentication2, getFullDisplayName, getName, getSubTasks, getUrl, getWhyBlocked, isBuildBlockedMethods inherited from interface hudson.model.ResourceActivity
getResourceListMethods inherited from interface jenkins.triggers.SCMTriggerItem
asItem, getSCMs, getSCMTrigger, poll, scheduleBuild2, schedulePollingMethods inherited from interface hudson.search.SearchableModelObject
getSearchMethods inherited from interface hudson.search.SearchItem
getSearchIcon, getSearchIndex, getSearchName, getSearchUrlMethods inherited from interface hudson.model.queue.SubTask
getEstimatedDuration, getLastBuiltOn, getOwnerExecutable, getOwnerTask, getSameNodeConstraint
-
Field Details
-
useShortWorkspaceName
public static boolean useShortWorkspaceNameOn Cygwin, path names cannot be longer than 256 chars. See http://cygwin.com/ml/cygwin/2005-04/msg00395.html and http://www.nabble.com/Windows-Filename-too-long-errors-t3161089.html for the background of this issue. Setting this flag to true would cause Jenkins to use cryptic but short path name, giving more room for jobs to use longer path names.
-
-
Constructor Details
-
MatrixConfiguration
-
-
Method Details
-
onLoad
- Specified by:
onLoadin interfaceItem- Overrides:
onLoadin classProject<MatrixConfiguration,MatrixRun> - Throws:
IOException
-
getEnvironment
public EnvVars getEnvironment(Node node, TaskListener listener) throws IOException, InterruptedException - Overrides:
getEnvironmentin classAbstractProject<MatrixConfiguration,MatrixRun> - Throws:
IOExceptionInterruptedException
-
isDisabled
public final boolean isDisabled()- Specified by:
isDisabledin interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,MatrixRun> - Overrides:
isDisabledin classAbstractProject<MatrixConfiguration,MatrixRun>
-
makeDisabled
- Specified by:
makeDisabledin interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,MatrixRun> - Throws:
IOException
-
supportsMakeDisabled
public final boolean supportsMakeDisabled()- Specified by:
supportsMakeDisabledin interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,MatrixRun> - Overrides:
supportsMakeDisabledin classAbstractProject<MatrixConfiguration,MatrixRun>
-
doDisable
- Specified by:
doDisablein interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,MatrixRun> - Throws:
IOException
-
updateTransientActions
protected void updateTransientActions()- Overrides:
updateTransientActionsin classAbstractProject<MatrixConfiguration,MatrixRun>
-
isConcurrentBuild
public boolean isConcurrentBuild()- Specified by:
isConcurrentBuildin interfaceQueue.Task- Overrides:
isConcurrentBuildin classAbstractProject<MatrixConfiguration,MatrixRun>
-
setConcurrentBuild
- Overrides:
setConcurrentBuildin classAbstractProject<MatrixConfiguration,MatrixRun> - Throws:
IOException
-
delete
- Specified by:
deletein interfaceItem- Overrides:
deletein classJob<MatrixConfiguration,MatrixRun> - Throws:
IOExceptionInterruptedException
-
getNextBuildNumber
public int getNextBuildNumber()Build numbers are always synchronized with the parent.Computing this is bit tricky. Several considerations:
- A new configuration build #N is started while the parent build #N is building, and when that happens we want to return N.
- But the configuration build #N is done before the parent build #N finishes, and when that happens we want to return N+1 because that's going to be the next one.
- Configuration builds might skip some numbers if the parent build is aborted before this configuration is built.
- If nothing is building right now and the last build of the parent is #N, then we want to return N+1.
- Specified by:
getNextBuildNumberin interfaceSCMTriggerItem- Overrides:
getNextBuildNumberin classJob<MatrixConfiguration,MatrixRun>
-
assignBuildNumber
- Overrides:
assignBuildNumberin classJob<MatrixConfiguration,MatrixRun> - Throws:
IOException
-
getDisplayName
- Specified by:
getDisplayNamein interfaceItem- Specified by:
getDisplayNamein interfaceModelObject- Specified by:
getDisplayNamein interfaceResourceActivity- Overrides:
getDisplayNamein classAbstractItem
-
getParent
- Specified by:
getParentin interfaceItem- Overrides:
getParentin classAbstractItem
-
getCombination
Get the actual combination of the axes values for thisMatrixConfiguration -
getQuietPeriod
public int getQuietPeriod()SinceMatrixConfigurationis always invoked fromMatrixRunonce and just once, there's no point in having a quiet period.- Specified by:
getQuietPeriodin interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,MatrixRun> - Specified by:
getQuietPeriodin interfaceSCMTriggerItem- Overrides:
getQuietPeriodin classAbstractProject<MatrixConfiguration,MatrixRun>
-
getScmCheckoutRetryCount
public int getScmCheckoutRetryCount()Inherit the value from the parent.- Overrides:
getScmCheckoutRetryCountin classAbstractProject<MatrixConfiguration,MatrixRun>
-
getScmCheckoutStrategy
Inherit the value from the parent.- Overrides:
getScmCheckoutStrategyin classAbstractProject<MatrixConfiguration,MatrixRun>
-
isConfigurable
public boolean isConfigurable()- Overrides:
isConfigurablein classAbstractProject<MatrixConfiguration,MatrixRun>
-
getBuildClass
- Specified by:
getBuildClassin classAbstractProject<MatrixConfiguration,MatrixRun>
-
newBuild
- Overrides:
newBuildin classAbstractProject<MatrixConfiguration,MatrixRun> - Throws:
IOException
-
buildDependencyGraph
- Overrides:
buildDependencyGraphin classProject<MatrixConfiguration,MatrixRun>
-
asProject
- Specified by:
asProjectin interfaceBuildableItemWithBuildWrappers- Overrides:
asProjectin classProject<MatrixConfiguration,MatrixRun>
-
getAssignedLabel
- Specified by:
getAssignedLabelin interfaceSubTask- Overrides:
getAssignedLabelin classAbstractProject<MatrixConfiguration,MatrixRun>
-
getPronoun
- Overrides:
getPronounin classAbstractProject<MatrixConfiguration,MatrixRun>
-
getJDK
- Overrides:
getJDKin classAbstractProject<MatrixConfiguration,MatrixRun>
-
getBuilders
- Overrides:
getBuildersin classProject<MatrixConfiguration,MatrixRun>
-
getPublishers
- Overrides:
getPublishersin classProject<MatrixConfiguration,MatrixRun>
-
getBuildersList
- Overrides:
getBuildersListin classProject<MatrixConfiguration,MatrixRun>
-
getPublishersList
- Overrides:
getPublishersListin classProject<MatrixConfiguration,MatrixRun>
-
getBuildWrappers
- Overrides:
getBuildWrappersin classProject<MatrixConfiguration,MatrixRun>
-
getBuildWrappersList
- Specified by:
getBuildWrappersListin interfaceBuildableItemWithBuildWrappers- Overrides:
getBuildWrappersListin classProject<MatrixConfiguration,MatrixRun>
-
getPublisher
- Overrides:
getPublisherin classProject<MatrixConfiguration,MatrixRun>
-
getBuildDiscarder
- Overrides:
getBuildDiscarderin classJob<MatrixConfiguration,MatrixRun>
-
getScm
- Overrides:
getScmin classAbstractProject<MatrixConfiguration,MatrixRun>
-
setJDK
Deprecated.Not supported.JDK cannot be set onMatrixConfigurationbecause it's controlled byMatrixProject.- Overrides:
setJDKin classAbstractProject<MatrixConfiguration,MatrixRun> - Throws:
IOException
-
setBuildDiscarder
Deprecated.Value is controlled byMatrixProject.- Overrides:
setBuildDiscarderin classJob<MatrixConfiguration,MatrixRun>
-
isActiveConfiguration
public boolean isActiveConfiguration()Returns true if this configuration is a configuration currently in use today (as opposed to the ones that are there only to keep the past record.)- See Also:
-
scheduleBuild
Deprecated.UsescheduleBuild(ParametersAction, Cause). Since 1.283 -
scheduleBuild
Deprecated.UsescheduleBuild(List, Cause). Since 1.480Starts the build with the ParametersAction that are passed in.- Parameters:
parameters- Can be null.
-
scheduleBuild
Starts the build with the actions that are passed in.- Parameters:
actions- Can be null.c- Reason for starting the build- Returns:
- true if the build has been scheduled
-
doConfigure
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public void doConfigure(org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException - Throws:
IOException
-
scheduleBuild(ParametersAction, Cause).