|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.AbstractModelObject
hudson.model.Actionable
hudson.model.AbstractItem
hudson.model.Job<P,R>
hudson.model.AbstractProject<MatrixProject,MatrixBuild>
hudson.matrix.MatrixProject
public class MatrixProject
Job
that allows you to run multiple different configurations
from a single setting.
Nested Class Summary | |
---|---|
static class |
MatrixProject.DescriptorImpl
|
Nested classes/interfaces inherited from class hudson.model.AbstractProject |
---|
AbstractProject.AbstractProjectDescriptor, AbstractProject.BecauseOfBuildInProgress, AbstractProject.BecauseOfDownstreamBuildInProgress, AbstractProject.BecauseOfUpstreamBuildInProgress |
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 | |
---|---|
static MatrixProject.DescriptorImpl |
DESCRIPTOR
|
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 |
Fields inherited from class hudson.model.AbstractItem |
---|
description, displayName, name, PRONOUN |
Fields inherited from interface hudson.model.Item |
---|
BUILD, CANCEL, CONFIGURE, CREATE, DELETE, DISCOVER, EXTENDED_READ, PERMISSIONS, READ, WIPEOUT, WORKSPACE |
Constructor Summary | |
---|---|
MatrixProject(ItemGroup parent,
String name)
|
|
MatrixProject(String name)
|
Method Summary | |
---|---|
MatrixProject |
asProject()
SCMedItem needs to be an instance of
AbstractProject . |
protected void |
buildDependencyGraph(DependencyGraph graph)
Builds the dependency graph. |
protected List<Action> |
createTransientActions()
|
org.kohsuke.stapler.HttpResponse |
doDoWipeOutWorkspace()
Also delete all the workspaces of the configuration, too. |
Collection<MatrixConfiguration> |
getActiveConfigurations()
Gets all active configurations. |
Collection<? extends Job> |
getAllJobs()
Gets all the jobs that this Item contains as descendants. |
AxisList |
getAxes()
|
protected Class<MatrixBuild> |
getBuildClass()
Determines Class<R>. |
List<Builder> |
getBuilders()
|
DescribableList<Builder,Descriptor<Builder>> |
getBuildersList()
|
Map<Descriptor<BuildWrapper>,BuildWrapper> |
getBuildWrappers()
|
DescribableList<BuildWrapper,Descriptor<BuildWrapper>> |
getBuildWrappersList()
BuildWrapper s associated with this AbstractProject . |
String |
getChildCustomWorkspace()
Gets the workspace location that MatrixConfiguration uses. |
String |
getCombinationFilter()
Obtains the combination filter, used to trim down the size of the matrix. |
MatrixProject.DescriptorImpl |
getDescriptor()
Gets the descriptor for this instance. |
Object |
getDynamic(String token,
org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
|
MatrixExecutionStrategy |
getExecutionStrategy()
|
MatrixConfiguration |
getItem(Combination c)
|
MatrixConfiguration |
getItem(String name)
Gets the Item inside this group that has a given name. |
Collection<MatrixConfiguration> |
getItems()
Gets all the items in this collection in a read-only view. |
JDK |
getJDK()
Deprecated. |
Set<JDK> |
getJDKs()
Gets the JDK s where the builds will be run. |
Set<Label> |
getLabels()
Gets the Label s where the builds will be run. |
Layouter<MatrixConfiguration> |
getLayouter()
|
Publisher |
getPublisher(Descriptor<Publisher> descriptor)
|
Map<Descriptor<Publisher>,Publisher> |
getPublishers()
|
DescribableList<Publisher,Descriptor<Publisher>> |
getPublishersList()
Returns the live list of all Publisher s configured for this project. |
Set<Label> |
getRelevantLabels()
MatrixProject is relevant with all the labels its configurations are relevant. |
File |
getRootDirFor(Combination combination)
|
File |
getRootDirFor(MatrixConfiguration child)
Assigns the root directory for children. |
MatrixConfigurationSorter |
getSorter()
Deprecated. as of 1.456 Use DefaultMatrixExecutionStrategyImpl.getSorter() .
This method tries to emulate the previous behavior the best it can, but will return null
if the current MatrixExecutionStrategy is not the default one. |
String |
getTouchStoneCombinationFilter()
Deprecated. as of 1.456 Use DefaultMatrixExecutionStrategyImpl.getTouchStoneCombinationFilter() .
This method tries to emulate the previous behavior the best it can, but will return null
if the current MatrixExecutionStrategy is not the default one. |
Result |
getTouchStoneResultCondition()
Deprecated. as of 1.456 Use DefaultMatrixExecutionStrategyImpl.getTouchStoneResultCondition() .
This method tries to emulate the previous behavior the best it can, but will return null
if the current MatrixExecutionStrategy is not the default one. |
String |
getUrlChildPrefix()
Gets the URL token that prefixes the URLs for child Item s. |
List<Axis> |
getUserAxes()
Deprecated. as of 1.373 System vs user difference are generalized into extension point. |
boolean |
hasChildCustomWorkspace()
Do we have an explicit child custom workspace setting (true)? Or just using the default value (false)? |
boolean |
isFingerprintConfigured()
True if the builds of this project produces Fingerprint records. |
boolean |
isRunSequentially()
Deprecated. as of 1.456 Use DefaultMatrixExecutionStrategyImpl.isRunSequentially() .
This method tries to emulate the previous behavior the best it can, but will return false
if the current MatrixExecutionStrategy is not the default one. |
void |
logRotate()
Perform log rotation. |
void |
onCreatedFromScratch()
When an item is created from scratch (instead of copied), this method will be invoked. |
void |
onDeleted(MatrixConfiguration item)
Internal method. |
void |
onLoad(ItemGroup<? extends Item> parent,
String name)
Called right after when a Item is loaded from disk. |
void |
onRenamed(MatrixConfiguration item,
String oldName,
String newName)
Internal method. |
void |
setAxes(AxisList axes)
Reconfigures axes. |
void |
setChildCustomWorkspace(String childCustomWorkspace)
|
void |
setCombinationFilter(String combinationFilter)
Sets the combination filter. |
void |
setExecutionStrategy(MatrixExecutionStrategy executionStrategy)
|
void |
setRunSequentially(boolean runSequentially)
Deprecated. as of 1.456 Use DefaultMatrixExecutionStrategyImpl.setRunSequentially(boolean) .
This method tries to emulate the previous behavior the best it can, but will fall back
to no-op if the current MatrixExecutionStrategy is not the default one. |
void |
setSorter(MatrixConfigurationSorter sorter)
Deprecated. as of 1.456 Use DefaultMatrixExecutionStrategyImpl.setSorter(MatrixConfigurationSorter) .
This method tries to emulate the previous behavior the best it can, but will fall back
to no-op if the current MatrixExecutionStrategy is not the default one. |
void |
setTouchStoneCombinationFilter(String touchStoneCombinationFilter)
Deprecated. as of 1.456 Use DefaultMatrixExecutionStrategyImpl.setTouchStoneCombinationFilter(String) .
This method tries to emulate the previous behavior the best it can, but will fall back
to no-op if the current MatrixExecutionStrategy is not the default one. |
void |
setTouchStoneResultCondition(Result touchStoneResultCondition)
Deprecated. as of 1.456 Use DefaultMatrixExecutionStrategyImpl.setTouchStoneResultCondition(Result) .
This method tries to emulate the previous behavior the best it can, but will fall back
to no-op if the current MatrixExecutionStrategy is not the default one. |
protected void |
submit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Derived class can override this to perform additional config submission work. |
protected void |
updateTransientActions()
effectively deprecated. |
Methods inherited from class hudson.model.Actionable |
---|
addAction, doContextMenu, getAction, getAction, getActions |
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.model.SCMedItem |
---|
getScm, poll, pollSCMChanges |
Methods inherited from interface hudson.model.ItemGroup |
---|
getFullDisplayName, getFullName, getUrl |
Methods inherited from interface hudson.model.BuildableItem |
---|
scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild |
Methods inherited from interface hudson.model.Item |
---|
delete, getAbsoluteUrl, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom |
Methods inherited from interface hudson.search.SearchableModelObject |
---|
getSearch |
Methods inherited from interface hudson.search.SearchItem |
---|
getSearchIndex, getSearchName, getSearchUrl |
Methods inherited from interface hudson.security.AccessControlled |
---|
checkPermission, getACL, hasPermission |
Field Detail |
---|
@Extension public static final MatrixProject.DescriptorImpl DESCRIPTOR
Constructor Detail |
---|
public MatrixProject(String name)
public MatrixProject(ItemGroup parent, String name)
Method Detail |
---|
public String getChildCustomWorkspace()
MatrixConfiguration
uses.
MatrixProject
uses no custom workspace, this method still
returns something like "${PARENT_WORKSPACE}/${COMBINATION}" that controls
how the workspace should be laid out.
The return value can be absolute or relative. If relative, it is resolved
against the working directory of the overarching MatrixBuild
.MatrixRun.MatrixRunExecution.decideWorkspace(Node, WorkspaceList)
public boolean hasChildCustomWorkspace()
public void setChildCustomWorkspace(String childCustomWorkspace) throws IOException
IOException
public Set<Label> getRelevantLabels()
MatrixProject
is relevant with all the labels its configurations are relevant.
getRelevantLabels
in class AbstractProject<MatrixProject,MatrixBuild>
AbstractProject.getAssignedLabel()
. The set can contain null element
to correspond to the null return value from AbstractProject.getAssignedLabel()
.public MatrixConfigurationSorter getSorter()
DefaultMatrixExecutionStrategyImpl.getSorter()
.
This method tries to emulate the previous behavior the best it can, but will return null
if the current MatrixExecutionStrategy
is not the default one.
public void setSorter(MatrixConfigurationSorter sorter) throws IOException
DefaultMatrixExecutionStrategyImpl.setSorter(MatrixConfigurationSorter)
.
This method tries to emulate the previous behavior the best it can, but will fall back
to no-op if the current MatrixExecutionStrategy
is not the default one.
IOException
public AxisList getAxes()
public void setAxes(AxisList axes) throws IOException
IOException
public MatrixExecutionStrategy getExecutionStrategy()
public void setExecutionStrategy(MatrixExecutionStrategy executionStrategy) throws IOException
IOException
public boolean isRunSequentially()
DefaultMatrixExecutionStrategyImpl.isRunSequentially()
.
This method tries to emulate the previous behavior the best it can, but will return false
if the current MatrixExecutionStrategy
is not the default one.
public void setRunSequentially(boolean runSequentially) throws IOException
DefaultMatrixExecutionStrategyImpl.setRunSequentially(boolean)
.
This method tries to emulate the previous behavior the best it can, but will fall back
to no-op if the current MatrixExecutionStrategy
is not the default one.
IOException
public void setCombinationFilter(String combinationFilter) throws IOException
combinationFilter
- the combinationFilter to set
IOException
public String getCombinationFilter()
By default, a MatrixConfiguration
is created for every possible combination of axes exhaustively.
But by specifying a Groovy expression as a combination filter, one can trim down the # of combinations built.
Namely, this expression is evaluated for each axis value combination, and only when it evaluates to true,
a corresponding MatrixConfiguration
will be created and built.
public String getTouchStoneCombinationFilter()
DefaultMatrixExecutionStrategyImpl.getTouchStoneCombinationFilter()
.
This method tries to emulate the previous behavior the best it can, but will return null
if the current MatrixExecutionStrategy
is not the default one.
public void setTouchStoneCombinationFilter(String touchStoneCombinationFilter) throws IOException
DefaultMatrixExecutionStrategyImpl.setTouchStoneCombinationFilter(String)
.
This method tries to emulate the previous behavior the best it can, but will fall back
to no-op if the current MatrixExecutionStrategy
is not the default one.
IOException
public Result getTouchStoneResultCondition()
DefaultMatrixExecutionStrategyImpl.getTouchStoneResultCondition()
.
This method tries to emulate the previous behavior the best it can, but will return null
if the current MatrixExecutionStrategy
is not the default one.
public void setTouchStoneResultCondition(Result touchStoneResultCondition) throws IOException
DefaultMatrixExecutionStrategyImpl.setTouchStoneResultCondition(Result)
.
This method tries to emulate the previous behavior the best it can, but will fall back
to no-op if the current MatrixExecutionStrategy
is not the default one.
IOException
protected List<Action> createTransientActions()
createTransientActions
in class AbstractProject<MatrixProject,MatrixBuild>
protected void updateTransientActions()
AbstractProject
Override AbstractProject.createTransientActions()
instead.
updateTransientActions
in class AbstractProject<MatrixProject,MatrixBuild>
public List<Axis> getUserAxes()
AxisList
that are not system axes.
public Layouter<MatrixConfiguration> getLayouter()
public void onCreatedFromScratch()
Item
onCreatedFromScratch
in interface Item
onCreatedFromScratch
in class AbstractProject<MatrixProject,MatrixBuild>
public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException
AbstractItem
Item
is loaded from disk.
This is an opporunity to do a post load processing.
onLoad
in interface Item
onLoad
in class AbstractProject<MatrixProject,MatrixBuild>
name
- Name of the directory (not a path --- just the name portion) from
which the configuration was loaded. This usually becomes the
name
of this item.
IOException
public void logRotate() throws IOException, InterruptedException
Job
logRotate
in class Job<MatrixProject,MatrixBuild>
IOException
InterruptedException
@Exported public Collection<MatrixConfiguration> getActiveConfigurations()
In contract, inactive configurations are those that are left for archival purpose
and no longer built when a new MatrixBuild
is executed.
During a build, MatrixBuild.MatrixBuildExecution.getActiveConfigurations()
should be used
to make sure that a build is using the consistent set of active configurations from
the start to the end.
public Collection<MatrixConfiguration> getItems()
ItemGroup
getItems
in interface ItemGroup<MatrixConfiguration>
public Collection<? extends Job> getAllJobs()
AbstractItem
Item
contains as descendants.
getAllJobs
in interface Item
getAllJobs
in class Job<MatrixProject,MatrixBuild>
public String getUrlChildPrefix()
ItemGroup
Item
s.
Like "job", "item", etc.
getUrlChildPrefix
in interface ItemGroup<MatrixConfiguration>
public MatrixConfiguration getItem(String name)
ItemGroup
Item
inside this group that has a given name.
getItem
in interface ItemGroup<MatrixConfiguration>
public MatrixConfiguration getItem(Combination c)
public File getRootDirFor(MatrixConfiguration child)
ItemGroup
root directory
for children.
getRootDirFor
in interface ItemGroup<MatrixConfiguration>
public void onRenamed(MatrixConfiguration item, String oldName, String newName) throws IOException
ItemGroup
Item
s when they are renamed by users.
onRenamed
in interface ItemGroup<MatrixConfiguration>
IOException
public void onDeleted(MatrixConfiguration item) throws IOException
ItemGroup
Item
s when they are deleted by users.
onDeleted
in interface ItemGroup<MatrixConfiguration>
IOException
public File getRootDirFor(Combination combination)
@Deprecated public JDK getJDK()
AbstractProject
getJDK
in class AbstractProject<MatrixProject,MatrixBuild>
getJDKs()
public Set<JDK> getJDKs()
JDK
s where the builds will be run.
public Set<Label> getLabels()
Label
s where the builds will be run.
public List<Builder> getBuilders()
public DescribableList<Builder,Descriptor<Builder>> getBuildersList()
public Map<Descriptor<Publisher>,Publisher> getPublishers()
public DescribableList<Publisher,Descriptor<Publisher>> getPublishersList()
AbstractProject
Publisher
s configured for this project.
This method couldn't be called getPublishers() because existing methods in sub-classes return different inconsistent types.
getPublishersList
in class AbstractProject<MatrixProject,MatrixBuild>
public DescribableList<BuildWrapper,Descriptor<BuildWrapper>> getBuildWrappersList()
BuildableItemWithBuildWrappers
BuildWrapper
s associated with this AbstractProject
.
getBuildWrappersList
in interface BuildableItemWithBuildWrappers
public Map<Descriptor<BuildWrapper>,BuildWrapper> getBuildWrappers()
public Publisher getPublisher(Descriptor<Publisher> descriptor)
protected Class<MatrixBuild> getBuildClass()
AbstractProject
getBuildClass
in class AbstractProject<MatrixProject,MatrixBuild>
public boolean isFingerprintConfigured()
AbstractProject
Fingerprint
records.
isFingerprintConfigured
in class AbstractProject<MatrixProject,MatrixBuild>
protected void buildDependencyGraph(DependencyGraph graph)
AbstractProject
buildDependencyGraph
in class AbstractProject<MatrixProject,MatrixBuild>
DependencyGraph
public MatrixProject asProject()
SCMedItem
SCMedItem
needs to be an instance of
AbstractProject
.
This method must be always implemented as (AbstractProject)this
, but
defining this method emphasizes the fact that this cast must be doable.
asProject
in interface BuildableItemWithBuildWrappers
asProject
in interface SCMedItem
public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
getDynamic
in class Job<MatrixProject,MatrixBuild>
protected void submit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormException
Job
submit
in class AbstractProject<MatrixProject,MatrixBuild>
IOException
javax.servlet.ServletException
Descriptor.FormException
public org.kohsuke.stapler.HttpResponse doDoWipeOutWorkspace() throws IOException, javax.servlet.ServletException, InterruptedException
doDoWipeOutWorkspace
in class AbstractProject<MatrixProject,MatrixBuild>
IOException
javax.servlet.ServletException
InterruptedException
public MatrixProject.DescriptorImpl getDescriptor()
Describable
Descriptor
is a singleton for every concrete Describable
implementation, so if a.getClass()==b.getClass() then
a.getDescriptor()==b.getDescriptor() must hold.
getDescriptor
in interface Describable<TopLevelItem>
getDescriptor
in interface TopLevelItem
Describable.getDescriptor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |