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> 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 classes/interfaces inherited from class hudson.model.AbstractProject
AbstractProject.AbstractProjectDescriptor, AbstractProject.BecauseOfBuildInProgress, AbstractProject.BecauseOfDownstreamBuildInProgress, AbstractProject.BecauseOfUpstreamBuildInProgress, AbstractProject.LabelValidator
Nested classes/interfaces inherited from class hudson.model.Job
Job.LastItemListener, Job.SubItemBuildsLocationImpl
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface org.kohsuke.stapler.HttpDeletable
org.kohsuke.stapler.HttpDeletable.HttpDeletableDispatcher
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
Nested classes/interfaces inherited from interface jenkins.triggers.SCMTriggerItem
SCMTriggerItem.SCMTriggerItems
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
On 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, triggers
Fields inherited from class hudson.model.Job
HISTORY_ADAPTER, nextBuildNumber, properties, runIdMigrator
Fields inherited from class hudson.model.AbstractItem
description, displayName, name, PRONOUN, SKIP_PERMISSION_CHECK, TASK_NOUN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
protected void
void
delete()
void
doConfigure
(org.kohsuke.stapler.StaplerResponse2 rsp) final org.kohsuke.stapler.HttpResponse
Get the actual combination of the axes values for thisMatrixConfiguration
getEnvironment
(Node node, TaskListener listener) getJDK()
int
Build numbers are always synchronized with the parent.getPublisher
(Descriptor<Publisher> descriptor) int
SinceMatrixConfiguration
is always invoked fromMatrixRun
once and just once, there's no point in having a quiet period.getScm()
int
Inherit the value from the parent.Inherit the value from the parent.boolean
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.)boolean
boolean
final boolean
final void
makeDisabled
(boolean b) protected MatrixRun
newBuild()
void
boolean
scheduleBuild
(ParametersAction parameters) Deprecated.boolean
scheduleBuild
(ParametersAction parameters, Cause c) Deprecated.boolean
scheduleBuild
(List<? extends Action> actions, Cause c) Starts the build with the actions that are passed in.void
setBuildDiscarder
(BuildDiscarder logRotator) Deprecated.Value is controlled byMatrixProject
.void
setConcurrentBuild
(boolean b) void
Deprecated.Not supported.final boolean
protected void
Methods inherited from class hudson.model.Project
addPublisher, asItem, createTransientActions, getResourceActivities, getSCMs, getSCMTrigger, inferMavenInstallation, isFingerprintConfigured, removePublisher, submit, submit
Methods 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, triggers
Methods 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, getTimeline, isBuilding, isHoldOffBuildUntilSave, isKeepDependencies, isLogUpdated, isNameEditable, logRotate, movedTo, onCopiedFrom, removeProperty, removeProperty, renameTo, saveNextBuildNumber, setLogRotator, supportsLogRotator, updateNextBuildNumber
Methods 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, writeReplace
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getAllActions, removeAction, removeActions, replaceAction, replaceActions
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendError
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, getACL, hasAnyPermission, hasPermission, hasPermission, hasPermission2
Methods inherited from interface hudson.model.BuildableItem
scheduleBuild, scheduleBuild
Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByName
Methods inherited from interface jenkins.widgets.HasWidgets
getWidget, getWidgets
Methods inherited from interface hudson.model.Item
getAbsoluteUrl, getAllJobs, getFullDisplayName, getFullName, getName, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, onCreatedFromScratch, save
Methods inherited from interface jenkins.model.ParameterizedJobMixIn.ParameterizedJob
doBuild, doBuild, doBuildWithParameters, doBuildWithParameters, doCancelQueue, doEnable, getParameterizedJobMixIn, isParameterized, scheduleBuild, scheduleBuild
Methods inherited from interface hudson.model.PersistenceRoot
getRootDir
Methods inherited from interface hudson.model.Queue.Task
checkAbortPermission, getAffinityKey, getCauseOfBlockage, getDefaultAuthentication, getDefaultAuthentication, getDefaultAuthentication2, getDefaultAuthentication2, getFullDisplayName, getName, getSubTasks, getUrl, getWhyBlocked, hasAbortPermission, isBuildBlocked
Methods inherited from interface hudson.model.ResourceActivity
getResourceList
Methods inherited from interface jenkins.triggers.SCMTriggerItem
asItem, getSCMs, getSCMTrigger, poll, scheduleBuild2, schedulePolling
Methods inherited from interface hudson.search.SearchableModelObject
getSearch
Methods inherited from interface hudson.search.SearchItem
getSearchIndex, getSearchName, getSearchUrl
Methods 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:
onLoad
in interfaceItem
- Overrides:
onLoad
in classProject<MatrixConfiguration,
MatrixRun> - Throws:
IOException
-
getEnvironment
public EnvVars getEnvironment(Node node, TaskListener listener) throws IOException, InterruptedException - Overrides:
getEnvironment
in classAbstractProject<MatrixConfiguration,
MatrixRun> - Throws:
IOException
InterruptedException
-
isDisabled
public final boolean isDisabled()- Specified by:
isDisabled
in interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,
MatrixRun> - Overrides:
isDisabled
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
makeDisabled
- Specified by:
makeDisabled
in interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,
MatrixRun> - Throws:
IOException
-
supportsMakeDisabled
public final boolean supportsMakeDisabled()- Specified by:
supportsMakeDisabled
in interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,
MatrixRun> - Overrides:
supportsMakeDisabled
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
doDisable
- Specified by:
doDisable
in interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,
MatrixRun> - Throws:
IOException
-
updateTransientActions
protected void updateTransientActions()- Overrides:
updateTransientActions
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
isConcurrentBuild
public boolean isConcurrentBuild()- Specified by:
isConcurrentBuild
in interfaceQueue.Task
- Overrides:
isConcurrentBuild
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
setConcurrentBuild
- Overrides:
setConcurrentBuild
in classAbstractProject<MatrixConfiguration,
MatrixRun> - Throws:
IOException
-
delete
- Specified by:
delete
in interfaceItem
- Overrides:
delete
in classJob<MatrixConfiguration,
MatrixRun> - Throws:
IOException
InterruptedException
-
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:
getNextBuildNumber
in interfaceSCMTriggerItem
- Overrides:
getNextBuildNumber
in classJob<MatrixConfiguration,
MatrixRun>
-
assignBuildNumber
- Overrides:
assignBuildNumber
in classJob<MatrixConfiguration,
MatrixRun> - Throws:
IOException
-
getDisplayName
- Specified by:
getDisplayName
in interfaceItem
- Specified by:
getDisplayName
in interfaceModelObject
- Specified by:
getDisplayName
in interfaceResourceActivity
- Overrides:
getDisplayName
in classAbstractItem
-
getParent
- Specified by:
getParent
in interfaceItem
- Overrides:
getParent
in classAbstractItem
-
getCombination
Get the actual combination of the axes values for thisMatrixConfiguration
-
getQuietPeriod
public int getQuietPeriod()SinceMatrixConfiguration
is always invoked fromMatrixRun
once and just once, there's no point in having a quiet period.- Specified by:
getQuietPeriod
in interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,
MatrixRun> - Specified by:
getQuietPeriod
in interfaceSCMTriggerItem
- Overrides:
getQuietPeriod
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
getScmCheckoutRetryCount
public int getScmCheckoutRetryCount()Inherit the value from the parent.- Overrides:
getScmCheckoutRetryCount
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
getScmCheckoutStrategy
Inherit the value from the parent.- Overrides:
getScmCheckoutStrategy
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
isConfigurable
public boolean isConfigurable()- Overrides:
isConfigurable
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
getBuildClass
- Specified by:
getBuildClass
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
newBuild
- Overrides:
newBuild
in classAbstractProject<MatrixConfiguration,
MatrixRun> - Throws:
IOException
-
buildDependencyGraph
- Overrides:
buildDependencyGraph
in classProject<MatrixConfiguration,
MatrixRun>
-
asProject
- Specified by:
asProject
in interfaceBuildableItemWithBuildWrappers
- Overrides:
asProject
in classProject<MatrixConfiguration,
MatrixRun>
-
getAssignedLabel
- Specified by:
getAssignedLabel
in interfaceSubTask
- Overrides:
getAssignedLabel
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
getPronoun
- Overrides:
getPronoun
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
getJDK
- Overrides:
getJDK
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
getBuilders
- Overrides:
getBuilders
in classProject<MatrixConfiguration,
MatrixRun>
-
getPublishers
- Overrides:
getPublishers
in classProject<MatrixConfiguration,
MatrixRun>
-
getBuildersList
- Overrides:
getBuildersList
in classProject<MatrixConfiguration,
MatrixRun>
-
getPublishersList
- Overrides:
getPublishersList
in classProject<MatrixConfiguration,
MatrixRun>
-
getBuildWrappers
- Overrides:
getBuildWrappers
in classProject<MatrixConfiguration,
MatrixRun>
-
getBuildWrappersList
- Specified by:
getBuildWrappersList
in interfaceBuildableItemWithBuildWrappers
- Overrides:
getBuildWrappersList
in classProject<MatrixConfiguration,
MatrixRun>
-
getPublisher
- Overrides:
getPublisher
in classProject<MatrixConfiguration,
MatrixRun>
-
getBuildDiscarder
- Overrides:
getBuildDiscarder
in classJob<MatrixConfiguration,
MatrixRun>
-
getScm
- Overrides:
getScm
in classAbstractProject<MatrixConfiguration,
MatrixRun>
-
setJDK
Deprecated.Not supported.JDK cannot be set onMatrixConfiguration
because it's controlled byMatrixProject
.- Overrides:
setJDK
in classAbstractProject<MatrixConfiguration,
MatrixRun> - Throws:
IOException
-
setBuildDiscarder
Deprecated.Value is controlled byMatrixProject
.- Overrides:
setBuildDiscarder
in 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)
.