Package hudson.matrix
Class MatrixConfiguration
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Actionable
-
- hudson.model.AbstractItem
-
- hudson.model.Job<P,R>
-
- hudson.model.AbstractProject<P,B>
-
- hudson.model.Project<MatrixConfiguration,MatrixRun>
-
- hudson.matrix.MatrixConfiguration
-
- 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>
,ModelObjectWithChildren
,ModelObjectWithContextMenu
,ParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,MatrixRun>
,SCMTriggerItem
,OnMaster
,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 ofMatrixProject
.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MatrixConfiguration.ParentBuildAction
-
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 jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
Nested classes/interfaces inherited from interface jenkins.triggers.SCMTriggerItem
SCMTriggerItem.SCMTriggerItems
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
useShortWorkspaceName
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
Constructors Constructor Description MatrixConfiguration(MatrixProject parent, Combination c)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MatrixConfiguration
asProject()
int
assignBuildNumber()
protected void
buildDependencyGraph(DependencyGraph graph)
void
delete()
void
doConfigure(org.kohsuke.stapler.StaplerResponse rsp)
org.kohsuke.stapler.HttpResponse
doDisable()
Label
getAssignedLabel()
protected Class<MatrixRun>
getBuildClass()
BuildDiscarder
getBuildDiscarder()
List<Builder>
getBuilders()
DescribableList<Builder,Descriptor<Builder>>
getBuildersList()
Map<Descriptor<BuildWrapper>,BuildWrapper>
getBuildWrappers()
DescribableList<BuildWrapper,Descriptor<BuildWrapper>>
getBuildWrappersList()
Combination
getCombination()
Get the actual combination of the axes values for thisMatrixConfiguration
String
getDisplayName()
EnvVars
getEnvironment(Node node, TaskListener listener)
JDK
getJDK()
int
getNextBuildNumber()
Build numbers are always synchronized with the parent.MatrixProject
getParent()
String
getPronoun()
Publisher
getPublisher(Descriptor<Publisher> descriptor)
Map<Descriptor<Publisher>,Publisher>
getPublishers()
DescribableList<Publisher,Descriptor<Publisher>>
getPublishersList()
int
getQuietPeriod()
SinceMatrixConfiguration
is always invoked fromMatrixRun
once and just once, there's no point in having a quiet period.SCM
getScm()
int
getScmCheckoutRetryCount()
Inherit the value from the parent.SCMCheckoutStrategy
getScmCheckoutStrategy()
Inherit the value from the parent.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.)boolean
isConcurrentBuild()
boolean
isConfigurable()
boolean
isDisabled()
void
makeDisabled(boolean b)
protected MatrixRun
newBuild()
void
onLoad(ItemGroup<? extends Item> parent, String name)
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
setJDK(JDK jdk)
Deprecated.Not supported.boolean
supportsMakeDisabled()
protected void
updateTransientActions()
-
Methods inherited from class hudson.model.Project
addPublisher, asItem, createTransientActions, getResourceActivities, getSCMs, getSCMTrigger, inferMavenInstallation, isFingerprintConfigured, removePublisher, submit
-
Methods inherited from class hudson.model.AbstractProject
_getRuns, addProperty, addToList, addTrigger, blockBuildWhenDownstreamBuilding, blockBuildWhenUpstreamBuilding, buildDescribable, buildDescribable, checkAbortPermission, checkout, createExecutable, createHistoryWidget, 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, 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, doBuildStatus, doChildrenContextMenu, doDescription, doDoRename, doRssAll, doRssChangelog, doRssFailed, getACL, getAllJobs, getAllProperties, getBuildDir, getBuildForCLI, getBuildHealth, getBuildHealthReports, getBuilds, getBuilds, getBuildsAsMap, getBuildsByTimestamp, getBuildStatusIconClassName, getBuildStatusUrl, getBuildTimeGraph, getCharacteristicEnvVars, getDynamic, getEstimatedDuration, getEstimatedDurationCandidates, getLastBuildsOverThreshold, getLastCompletedBuild, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getLastUnstableBuild, getLastUnsuccessfulBuild, getLogRotator, getNewBuilds, getOverrides, getPermalinks, getProperties, getProperty, getProperty, getTimeline, getWidgets, isBuilding, isHoldOffBuildUntilSave, isKeepDependencies, isLogUpdated, isNameEditable, logRotate, movedTo, onCopiedFrom, removeProperty, removeProperty, renameTo, saveNextBuildNumber, setLogRotator, supportsLogRotator, updateNextBuildNumber
-
Methods inherited from class hudson.model.AbstractItem
delete, doCheckNewName, doConfigDotXml, doConfirmRename, doDoDelete, doReload, doSetName, doSubmitDescription, getAbsoluteUrl, getApi, getConfigFile, getDescription, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getRelativeDisplayNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getTarget, getTaskNoun, getUrl, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXml, writeConfigDotXml, writeReplace
-
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getAllActions, removeAction, removeActions, replaceAction, replaceActions
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, requirePOST, 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 hudson.model.Item
getAbsoluteUrl, getAllJobs, getFullDisplayName, getFullName, getName, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, onCreatedFromScratch, save
-
Methods inherited from interface jenkins.model.ParameterizedJobMixIn.ParameterizedJob
doBuild, 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, getOwnerTask, getSameNodeConstraint
-
-
-
-
Field Detail
-
useShortWorkspaceName
public static boolean useShortWorkspaceName
On 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 Detail
-
MatrixConfiguration
public MatrixConfiguration(MatrixProject parent, Combination c)
-
-
Method Detail
-
onLoad
public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException
- 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
public final void makeDisabled(boolean b) throws IOException
- 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
public final org.kohsuke.stapler.HttpResponse doDisable() throws IOException, javax.servlet.ServletException
- Specified by:
doDisable
in interfaceParameterizedJobMixIn.ParameterizedJob<MatrixConfiguration,MatrixRun>
- Throws:
IOException
javax.servlet.ServletException
-
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
public void setConcurrentBuild(boolean b) throws IOException
- Overrides:
setConcurrentBuild
in classAbstractProject<MatrixConfiguration,MatrixRun>
- Throws:
IOException
-
delete
public void delete() throws IOException, InterruptedException
- 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
public int assignBuildNumber() throws IOException
- Overrides:
assignBuildNumber
in classJob<MatrixConfiguration,MatrixRun>
- Throws:
IOException
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceItem
- Specified by:
getDisplayName
in interfaceModelObject
- Specified by:
getDisplayName
in interfaceResourceActivity
- Overrides:
getDisplayName
in classAbstractItem
-
getParent
public MatrixProject getParent()
- Specified by:
getParent
in interfaceItem
- Overrides:
getParent
in classAbstractItem
-
getCombination
public Combination 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
public SCMCheckoutStrategy getScmCheckoutStrategy()
Inherit the value from the parent.- Overrides:
getScmCheckoutStrategy
in classAbstractProject<MatrixConfiguration,MatrixRun>
-
isConfigurable
public boolean isConfigurable()
- Overrides:
isConfigurable
in classAbstractProject<MatrixConfiguration,MatrixRun>
-
getBuildClass
protected Class<MatrixRun> getBuildClass()
- Specified by:
getBuildClass
in classAbstractProject<MatrixConfiguration,MatrixRun>
-
newBuild
protected MatrixRun newBuild() throws IOException
- Overrides:
newBuild
in classAbstractProject<MatrixConfiguration,MatrixRun>
- Throws:
IOException
-
buildDependencyGraph
protected void buildDependencyGraph(DependencyGraph graph)
- Overrides:
buildDependencyGraph
in classProject<MatrixConfiguration,MatrixRun>
-
asProject
public MatrixConfiguration asProject()
- Specified by:
asProject
in interfaceBuildableItemWithBuildWrappers
- Overrides:
asProject
in classProject<MatrixConfiguration,MatrixRun>
-
getAssignedLabel
public Label getAssignedLabel()
- Specified by:
getAssignedLabel
in interfaceSubTask
- Overrides:
getAssignedLabel
in classAbstractProject<MatrixConfiguration,MatrixRun>
-
getPronoun
public String getPronoun()
- Overrides:
getPronoun
in classAbstractProject<MatrixConfiguration,MatrixRun>
-
getJDK
public JDK getJDK()
- Overrides:
getJDK
in classAbstractProject<MatrixConfiguration,MatrixRun>
-
getBuilders
public List<Builder> getBuilders()
- Overrides:
getBuilders
in classProject<MatrixConfiguration,MatrixRun>
-
getPublishers
public Map<Descriptor<Publisher>,Publisher> getPublishers()
- Overrides:
getPublishers
in classProject<MatrixConfiguration,MatrixRun>
-
getBuildersList
public DescribableList<Builder,Descriptor<Builder>> getBuildersList()
- Overrides:
getBuildersList
in classProject<MatrixConfiguration,MatrixRun>
-
getPublishersList
public DescribableList<Publisher,Descriptor<Publisher>> getPublishersList()
- Overrides:
getPublishersList
in classProject<MatrixConfiguration,MatrixRun>
-
getBuildWrappers
public Map<Descriptor<BuildWrapper>,BuildWrapper> getBuildWrappers()
- Overrides:
getBuildWrappers
in classProject<MatrixConfiguration,MatrixRun>
-
getBuildWrappersList
public DescribableList<BuildWrapper,Descriptor<BuildWrapper>> getBuildWrappersList()
- Specified by:
getBuildWrappersList
in interfaceBuildableItemWithBuildWrappers
- Overrides:
getBuildWrappersList
in classProject<MatrixConfiguration,MatrixRun>
-
getPublisher
public Publisher getPublisher(Descriptor<Publisher> descriptor)
- Overrides:
getPublisher
in classProject<MatrixConfiguration,MatrixRun>
-
getBuildDiscarder
public BuildDiscarder getBuildDiscarder()
- Overrides:
getBuildDiscarder
in classJob<MatrixConfiguration,MatrixRun>
-
getScm
public SCM getScm()
- Overrides:
getScm
in classAbstractProject<MatrixConfiguration,MatrixRun>
-
setJDK
public void setJDK(JDK jdk) throws IOException
Deprecated.Not supported.JDK cannot be set onMatrixConfiguration
because it's controlled byMatrixProject
.- Overrides:
setJDK
in classAbstractProject<MatrixConfiguration,MatrixRun>
- Throws:
IOException
-
setBuildDiscarder
public void setBuildDiscarder(BuildDiscarder logRotator)
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:
MatrixProject.getActiveConfigurations()
-
scheduleBuild
public boolean scheduleBuild(ParametersAction parameters)
Deprecated.UsescheduleBuild(ParametersAction, Cause)
. Since 1.283
-
scheduleBuild
public boolean scheduleBuild(ParametersAction parameters, Cause c)
Deprecated.UsescheduleBuild(List, Cause)
. Since 1.480Starts the build with the ParametersAction that are passed in.- Parameters:
parameters
- Can be null.
-
scheduleBuild
public boolean scheduleBuild(List<? extends Action> actions, Cause c)
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.StaplerResponse rsp) throws IOException
- Throws:
IOException
-
-