|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SBuildType
This class represents TeamCity build configuration on the server-side.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface jetbrains.buildServer.BuildTypeDescriptor |
|---|
BuildTypeDescriptor.CheckoutType |
| Field Summary |
|---|
| Fields inherited from interface jetbrains.buildServer.serverSide.BuildTypeOptions |
|---|
BT_ALLOW_EXTERNAL_STATUS, BT_CLEAN_BUILD, BT_EXECUTION_TIMEOUT, BT_FAIL_IF_TESTS_FAIL, BT_FAIL_ON_ANY_ERROR_MESSAGE, BT_FAIL_ON_EXIT_CODE, BT_FAIL_ON_OOME_OR_CRASH, BT_HANGING_BUILDS_DETECTION_ENABLED, BT_MAX_RUNNING_BUILDS, BT_PREVENT_DEPENDENCIES_ARTIFACTS_FROM_CLEANUP |
| Method Summary | ||
|---|---|---|
void |
addBuildParameter(Parameter parameter)
Adds build parameter to the configuration. |
|
void |
addBuildTrigger(BuildTrigger trigger)
Adds new trigger to the configuration. |
|
void |
addRequirement(Requirement requirement)
Adds new build requirement to the contifuration. |
|
void |
addRunParameter(Parameter parameter)
Adds new run parameter. |
|
SQueuedBuild |
addToQueue(BuildAgent agent,
java.lang.String triggeredBy)
Adds build instance of the configuration to the queue with the specified requestor name on the specified agent (if agent is authorized). |
|
SQueuedBuild |
addToQueue(java.lang.String triggeredBy)
Adds build instance of the configuration to the queue with the specified requestor name. |
|
void |
addVcsRoot(SVcsRoot root)
Adds VCS root to the build configuration with default checkout rules. |
|
void |
clearRunParameters()
Removes all run parameters. |
|
boolean |
containsVcsRoot(long vcsRootId)
Returns true if VCS root with specified is attached to the build configuration |
|
SBuildType |
copyToProject(SProject target,
java.lang.String newName,
CopyOptions opts)
Copies this build configuration to the target project. |
|
void |
forceCheckingForChanges()
Starts checking for changes for all VCS roots of this build configuration |
|
java.util.List<AgentCompatibility> |
getAgentCompatibilities()
Returns information about what agent are compatible with the configuration, what are incompatible and why. |
|
|
getAgentCompatibility(T agent)
Returns information about agent compatibility for the specified agent. |
|
java.util.List<SBuildAgent> |
getAgentsWhereBuildConfigurationBuilt()
Returns list of agents (sorted by name) where this build configuration was ever built. |
|
java.util.List<SArtifactDependency> |
getArtifactDependencies()
Returns artifacts this build configuration depending on. |
|
java.lang.String |
getArtifactPaths()
Returns build artifact paths. |
|
java.io.File |
getArtifactsDirectory()
Returns directory containing artifacts of this build configuration. |
|
java.util.List<SBuildType> |
getArtifactsReferences()
Returns list of build configurations which depend on this build configurations artifacts |
|
BuildNumbers |
getBuildNumbers()
Return information about build number pattern ( BuildNumbers.getBuildNumberPattern()) and
current build counter(BuildNumbers.getBuildCounter() ) |
|
java.util.Map<java.lang.String,java.lang.String> |
getBuildParameters()
Return map of build parameters specified by user. |
|
java.util.Collection<Parameter> |
getBuildParametersCollection()
Returns build parameters collection. |
|
RunType |
getBuildRunner()
Return server-side implementation for build runner (RunType) for this build configuration |
|
java.util.Collection<BuildTrigger> |
getBuildTriggers()
Returns all triggers for the configuration. |
|
|
getCanRunAgents()
Returns list of agents where this build configuration can run. |
|
|
getCanRunAndCompatibleAgents(boolean includeDisabled)
Returns list of agents which are both allowed to run this configuration and are compatble with it. |
|
java.lang.String |
getCheckoutDirectory()
Returns build checkout directory - if specified explicitly. |
|
CheckoutRules |
getCheckoutRules(VcsRoot root)
Returns checkout rules configured for the specified VCS root. |
|
|
getCompatibleAgents()
Returns list of all agents compatible with the configuration. |
|
int |
getExecutionTimeoutMin()
Returns duration the build allowed to run until killed by the server. |
|
java.util.List<FilteredVcsChange> |
getFilteredChanges(SVcsModification modification,
SBuild build)
Deprecated. use SVcsModification.getFilteredChanges(SBuildType) or SVcsModification.getFilteredChanges(SBuild) methods instead |
|
java.util.List<SFinishedBuild> |
getHistory()
See also BuildHistory.processEntries(jetbrains.buildServer.util.ItemProcessor) |
|
java.util.List<SFinishedBuild> |
getHistory(boolean includeCanceled)
Deprecated. AFTER Calcutta, use @{link #getHistory(User, boolean)} |
|
java.util.List<SFinishedBuild> |
getHistory(User user,
boolean includeCanceled)
Deprecated. After Calcutta, will be removed; use #getHistory(user, includeCanceled, orderByChanges) |
|
java.util.List<SFinishedBuild> |
getHistory(User user,
boolean includeCanceled,
boolean orderByChanges)
Returns all finished builds, visible for the specified user of this configuration. |
|
java.util.List<SFinishedBuild> |
getHistoryFull(boolean orderByChanges)
See also BuildHistory.processEntries(String, jetbrains.buildServer.users.User, boolean, boolean, boolean, jetbrains.buildServer.util.ItemProcessor) |
|
java.util.List<Requirement> |
getImplicitRequirements()
Get list of implicit requirements for build agents. |
|
java.util.List<VcsRoot> |
getLabelingRoots()
List of roots whuch should be processed while labeling process |
|
VcsLabelingSettings.LabelingType |
getLabelingType()
Labeling mode |
|
java.lang.String |
getLabelPattern()
Labeling pattern |
|
SFinishedBuild |
getLastChangesFinished()
Returns last finished instance for the build configuration with last user changes (personal builds and canceled builds are excluded). |
|
SBuild |
getLastChangesStartedBuild()
Returns instance of the build, finished or running, which contains latest changes in this build configuration |
|
SFinishedBuild |
getLastChangesSuccessfullyFinished()
Returns last successfully finished build in the configuration with last user changes, personal builds are not considered |
|
SBuild |
getLastFinished()
Deprecated. see getLastChangesFinished() |
|
SBuild |
getLastStartedBuild()
Deprecated. see getLastChangesStartedBuild() |
|
SFinishedBuild |
getLastSuccessfullyFinished()
Deprecated. see getLastChangesSuccessfullyFinished() |
|
int |
getMaximumNumberOfBuilds()
Returns maximum number of simultaneously running builds. 0 means there is no limit on a number of builds. |
|
java.util.List<SVcsModification> |
getModificationsSinceLastSuccessful()
Returns all modifications made since last successfully finished build |
|
int |
getNumberOfArtifactReferences()
Returns number of dependent build configuration having references to this build configuration. |
|
Comment |
getPauseComment()
Returns comment for pausing/resuming this build type |
|
java.util.List<SVcsModification> |
getPendingChanges()
Returns all changes already detected but not associated with a build. |
|
java.util.Collection<SUser> |
getPendingChangesCommitters()
Returns pending changes committers to this build configuration |
|
SProject |
getProject()
Returns parent project for the configuration. |
|
java.util.List<SQueuedBuild> |
getQueuedBuilds(User user)
If user is null returns all queued builds including all personal builds. |
|
java.util.List<Requirement> |
getRequirements()
Get list of explicit requirements for build agents which can run this build configuration. |
|
java.util.List<SRunningBuild> |
getRunningBuilds()
Same as getRunningBuilds(null) |
|
java.util.List<SRunningBuild> |
getRunningBuilds(User user)
See BuildType.getRunningBuilds(User) |
|
java.util.Map<java.lang.String,java.lang.String> |
getRunParameters()
Return map of run parameters for this build configuration. |
|
java.util.List<Requirement> |
getRunTypeRequirements()
Returns list of additional agent requirements imposed by selected runner. |
|
java.util.List<java.lang.String> |
getTags()
List of all tags set for builds of this configuration. |
|
java.util.List<SBuildType> |
getTriggeredBy()
Return list of build configurations which add me to build queue when successfully finish. |
|
ValueResolver |
getValueResolver()
Returns value resolver that can be used to resolve values based on build type parameters. |
|
java.util.List<VcsRootEntry> |
getVcsRootEntries()
Returns all entries of vcs roots. |
|
java.util.List<SVcsRoot> |
getVcsRoots()
Returns all roots currently attached to this configuration |
|
java.lang.String |
getVcsSettingsHash(java.util.List<VcsRootEntry> vcsRootEntries)
Return name of the directory which should be used as checkout directory for this build configuration. |
|
boolean |
isAllowExternalStatus()
Returns if viewing of the configuration status is allowed externally. |
|
boolean |
isCleanBuild()
Returns if all files on an agent machine should be deleted before the build is started. |
|
boolean |
isShouldFailBuildIfTestsFailed()
Returns true if build of the configuration has to fail if there is failed test. |
|
PathMapping |
mapVcsPath(java.lang.String path)
Returns path mapping for the given full VCS path of a file if this path can correspond to any of the project's VCS roots. |
|
void |
moveToProject(SProject target,
boolean changeScopeOfLocalRoots)
Moves this build configuration to the target project. |
|
void |
releaseSources()
Releases sources of the build configuration on ALL agents where this configuration built. |
|
void |
releaseSources(SBuildAgent agent)
Releases sources of the build configuration on specified agent only. |
|
void |
removeBuildParameter(java.lang.String paramName)
Removes existing build parameter by its name. |
|
void |
removeBuildTrigger(BuildTrigger trigger)
Removes sppecified trigger. |
|
void |
removeRequirement(java.lang.String propertyName)
Removes requirement with the specified property name from the configuration. |
|
void |
removeVcsRoot(SVcsRoot root)
Removes existing VCS root from the build configuration. |
|
void |
setArtifactDependencies(java.util.List<SArtifactDependency> artifacts)
Sets artifacts this build configuration depending on. |
|
void |
setArtifactPaths(java.lang.String artifactPaths)
Sets build artifact paths. |
|
void |
setCheckoutDirectory(java.lang.String dir)
Sets build checkout directory. |
|
void |
setCheckoutRules(VcsRoot root,
CheckoutRules checkoutRules)
Sets checkout rules for specified VCS root. |
|
void |
setCheckoutType(BuildTypeDescriptor.CheckoutType type)
Changes checkout type for the configuration sources. |
|
void |
setDescription(java.lang.String description)
Chanegs configuration description. |
|
void |
setLabelingRoots(java.util.List<VcsRoot> roots)
Changes list of roots whuch should be processed while labeling process |
|
void |
setLabelingType(VcsLabelingSettings.LabelingType type)
Changes labeling mode for the configuration |
|
void |
setLabelPattern(java.lang.String pattern)
Changes labeling pattern |
|
void |
setName(java.lang.String newName)
Renames this build configuration |
|
void |
setPaused(boolean paused,
User user)
Deprecated. use setPaused(boolean, jetbrains.buildServer.users.User, String) |
|
void |
setPaused(boolean paused,
User user,
java.lang.String comment)
Pause/unpause this build configuration. |
|
void |
setRunType(java.lang.String runnerType)
Changes configuration runner. |
|
void |
setSleepingChangeBrowserPeriod(int value)
Deprecated. |
|
| Methods inherited from interface jetbrains.buildServer.BuildType |
|---|
getBuildByBuildNumber, getBuildParameter, getNumberQueued, getResponsibilityInfo, getRunParameter, getStatus, isInQueue, removeResponsible, removeResponsible, setResponsible, setResponsible |
| Methods inherited from interface jetbrains.buildServer.BuildTypeDescriptor |
|---|
getBuildTypeId, getCheckoutType, getDescription, getFullName, getName, getProjectId, getProjectName, getRunType, isPaused, isPersonal |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Methods inherited from interface jetbrains.buildServer.util.OptionSupport |
|---|
getChangedOptions, getOption, setOption |
| Methods inherited from interface jetbrains.buildServer.serverSide.dependency.Dependent |
|---|
addDependency, getDependencies, getDependencyReferences, getNumberOfDependencyReferences, intersectsWith, removeDependency |
| Methods inherited from interface jetbrains.buildServer.XmlExternalizable |
|---|
writeTo |
| Method Detail |
|---|
@Nullable RunType getBuildRunner()
BuildTypeDescriptor.getRunType()java.util.List<Requirement> getRequirements()
void addRequirement(@NotNull
Requirement requirement)
requirement - new requirement.void removeRequirement(java.lang.String propertyName)
propertyName - given property name.java.util.List<Requirement> getImplicitRequirements()
java.util.List<Requirement> getRunTypeRequirements()
java.util.Map<java.lang.String,java.lang.String> getBuildParameters()
java.util.Collection<Parameter> getBuildParametersCollection()
void addBuildParameter(Parameter parameter)
Constants.SYSTEM_PREFIX for system properties
and Constants.ENV_PREFIX for environment variable.
parameter - specified parameter.void removeBuildParameter(java.lang.String paramName)
paramName - specified parameter name.java.util.Map<java.lang.String,java.lang.String> getRunParameters()
getBuildRunner()).
specified by user. Each build parameter has name and value.
Name of each parameter starts from a prefix env. or system.
Value may by either simple string, or may contain references to other parameters in form %env.HOME%
or %system.os.name% or %system.agent.name%
void clearRunParameters()
void addRunParameter(Parameter parameter)
parameter - new run parameter.java.util.Collection<BuildTrigger> getBuildTriggers()
void addBuildTrigger(BuildTrigger trigger)
trigger - new trigger.void removeBuildTrigger(BuildTrigger trigger)
trigger - given trigger.java.util.List<SFinishedBuild> getHistory()
BuildHistory.processEntries(jetbrains.buildServer.util.ItemProcessor)
java.util.List<SFinishedBuild> getHistoryFull(boolean orderByChanges)
BuildHistory.processEntries(String, jetbrains.buildServer.users.User, boolean, boolean, boolean, jetbrains.buildServer.util.ItemProcessor)
orderByChanges - if true, builds are ordered by changes, i.e. most recent build with recent changes goes first; if false, most recent builds go first, regardless change order
java.util.List<SFinishedBuild> getHistory(@Nullable
User user,
boolean includeCanceled,
boolean orderByChanges)
user - specified user. If user is null no personal builds will be included into the list,
otherwise there will be personal builds for the specified user.includeCanceled - if canceled builds should be included.orderByChanges - if true, builds are ordered by changes, i.e. most recent build with recent changes goes first; if false, most recent builds go first, regardless change order
- Returns:
- list of all finished builds sorted according to orderByChanges field.
@Nullable SBuild getLastChangesStartedBuild()
java.util.List<AgentCompatibility> getAgentCompatibilities()
AgentCompatibility are provided for all registered agents.
<T extends SBuildAgent> AgentCompatibility getAgentCompatibility(T agent)
agent - the given agent.
<T extends BuildAgent> java.util.Collection<T> getCompatibleAgents()
<T extends BuildAgent> java.util.List<T> getCanRunAgents()
BuildAgentManager.RunConfigurationPolicy allows to run
this build configuration.
<T extends BuildAgent> java.util.List<T> getCanRunAndCompatibleAgents(boolean includeDisabled)
includeDisabled - true to include disabled agents in the list, by default they are excluded
BuildNumbers getBuildNumbers()
BuildNumbers.getBuildNumberPattern()) and
current build counter(BuildNumbers.getBuildCounter() )
java.util.List<SRunningBuild> getRunningBuilds(@Nullable
User user)
BuildType.getRunningBuilds(User)
getRunningBuilds in interface BuildTypeuser - owner of personal builds
java.util.List<SRunningBuild> getRunningBuilds()
getRunningBuilds in interface BuildType@Nullable SFinishedBuild getLastChangesFinished()
BuildType
getLastChangesFinished in interface BuildTypenull if no any build has been finished yet.@Nullable SFinishedBuild getLastChangesSuccessfullyFinished()
BuildType
getLastChangesSuccessfullyFinished in interface BuildTypenull if there are no successfully finished builds.
void setPaused(boolean paused,
User user)
setPaused(boolean, jetbrains.buildServer.users.User, String)
paused - if configuration should be pauseduser - use who is pausing the configuration
void setPaused(boolean paused,
User user,
java.lang.String comment)
paused - if configuration should be pauseduser - use who is pausing the configurationcomment - user comment@Nullable Comment getPauseComment()
void setSleepingChangeBrowserPeriod(int value)
@NotNull SProject getProject()
void setName(@NotNull
java.lang.String newName)
throws DuplicateBuildTypeNameException,
BuildTypeRenamingFailedException
newName - new name
DuplicateBuildTypeNameException - if another build configuration with such name exists in the build configuration project
BuildTypeRenamingFailedException - if build configuration renaming failed
void setDescription(@Nullable
java.lang.String description)
description - new configuration description.void setCheckoutType(BuildTypeDescriptor.CheckoutType type)
CheckoutType#ON_SERVER - checkout sources automatically on the server and snd it to the agent.
CheckoutType#ON_AGENT - checkout sources automatically on the agent.
CheckoutType#MANUAL - do not check out sources automatically.
type - new checkout type.
void setCheckoutDirectory(@Nullable
java.lang.String dir)
dir - checkout directory@Nullable java.lang.String getCheckoutDirectory()
getVcsSettingsHash(java.util.List)
void setArtifactPaths(@Nullable
java.lang.String artifactPaths)
artifactPaths - paths to build artifacts@Nullable java.lang.String getArtifactPaths()
void setRunType(@NotNull
java.lang.String runnerType)
runnerType - new runner type name.RunType.getType()java.util.List<SArtifactDependency> getArtifactDependencies()
java.util.List<SBuildType> getArtifactsReferences()
int getNumberOfArtifactReferences()
getArtifactsReferences() because it
takes into account all dependent build configurations while getArtifactsReferences() returns
only build configurations accessible to an authority currently set in the security context.
void setArtifactDependencies(@NotNull
java.util.List<SArtifactDependency> artifacts)
artifacts - new artifacts dependency list.java.util.List<SBuildType> getTriggeredBy()
@NotNull java.io.File getArtifactsDirectory()
java.util.List<SVcsRoot> getVcsRoots()
getVcsRoots in interface BuildTypeboolean containsVcsRoot(long vcsRootId)
vcsRootId - id of VCS root
java.util.List<VcsRootEntry> getVcsRootEntries()
void addVcsRoot(@NotNull
SVcsRoot root)
throws InvalidVcsRootScopeException,
VcsRootNotFoundException
root - VCS root to add
InvalidVcsRootScopeException - if VCS root scope is local and corresponds to another project (not the project - owner of this build configuration)
VcsRootNotFoundException - if specified VCS root does not exist anymore
void removeVcsRoot(@NotNull
SVcsRoot root)
root - VCS root to remove
void setCheckoutRules(@NotNull
VcsRoot root,
@NotNull
CheckoutRules checkoutRules)
root - root to set rules forcheckoutRules - checkout rules for the VCS root
CheckoutRules getCheckoutRules(@NotNull
VcsRoot root)
root - VCS root
java.util.List<FilteredVcsChange> getFilteredChanges(@NotNull
SVcsModification modification,
@Nullable
SBuild build)
SVcsModification.getFilteredChanges(SBuildType) or SVcsModification.getFilteredChanges(SBuild) methods instead
modification - VCS modificationbuild - build where modification occurred or null if this is a pending modification
java.util.List<SVcsModification> getPendingChanges()
getPendingChanges in interface BuildTypejava.util.Collection<SUser> getPendingChangesCommitters()
java.util.List<SVcsModification> getModificationsSinceLastSuccessful()
getModificationsSinceLastSuccessful in interface BuildTypejava.lang.String getVcsSettingsHash(java.util.List<VcsRootEntry> vcsRootEntries)
BuildTypeDescriptor.getCheckoutType() and checkout rules getCheckoutRules(jetbrains.buildServer.vcs.VcsRoot)
If checkout directory was specified explicitly for the build configuration, hash for this string is returned.
vcsRootEntries - vcs roots with checkout rules to get name hash for.
setCheckoutDirectory(String)void releaseSources()
void releaseSources(@NotNull
SBuildAgent agent)
agent - agent@NotNull java.util.List<SBuildAgent> getAgentsWhereBuildConfigurationBuilt()
java.util.List<java.lang.String> getTags()
VcsLabelingSettings.LabelingType getLabelingType()
void setLabelingType(VcsLabelingSettings.LabelingType type)
type - new labeling mode@Nullable java.lang.String getLabelPattern()
void setLabelPattern(java.lang.String pattern)
pattern - new patternvoid forceCheckingForChanges()
@Nullable
SQueuedBuild addToQueue(@NotNull
java.lang.String triggeredBy)
triggeredBy - contains details about who triggered build, see also TriggeredByBuilder
@Nullable
SQueuedBuild addToQueue(@NotNull
BuildAgent agent,
@NotNull
java.lang.String triggeredBy)
agent - specified agent.triggeredBy - contains details about who triggered build, see also TriggeredByBuilder
null if agent is not authorized,
new SQueuedBuild instance if queue does not contain
this configuration with specified agent and existing one otherwise
@NotNull
java.util.List<SQueuedBuild> getQueuedBuilds(@Nullable
User user)
user - user
java.util.List<VcsRoot> getLabelingRoots()
void setLabelingRoots(java.util.List<VcsRoot> roots)
roots - new roots to be labeledboolean isCleanBuild()
BuildTypeOptions.BT_CLEAN_BUILDboolean isShouldFailBuildIfTestsFailed()
true if build of the configuration has to fail if there is failed test.
BuildTypeOptions.BT_FAIL_IF_TESTS_FAILint getExecutionTimeoutMin()
BuildTypeOptions.BT_EXECUTION_TIMEOUTint getMaximumNumberOfBuilds()
BuildTypeOptions.BT_MAX_RUNNING_BUILDSboolean isAllowExternalStatus()
BuildTypeOptions.BT_ALLOW_EXTERNAL_STATUS@NotNull ValueResolver getValueResolver()
SBuildType copyToProject(@NotNull
SProject target,
java.lang.String newName,
CopyOptions opts)
target project.
target - the destination projectnewName - new build type nameopts - copy options
void moveToProject(@NotNull
SProject target,
boolean changeScopeOfLocalRoots)
target project.
target - the destination projectchangeScopeOfLocalRoots - what to do with local rootsjava.util.List<SFinishedBuild> getHistory(boolean includeCanceled)
includeCanceled - if canceled builds should be included.
@Nullable SBuild getLastStartedBuild()
getLastChangesStartedBuild()
@Nullable SBuild getLastFinished()
getLastChangesFinished()
@Nullable SFinishedBuild getLastSuccessfullyFinished()
getLastChangesSuccessfullyFinished()
java.util.List<SFinishedBuild> getHistory(@Nullable
User user,
boolean includeCanceled)
user - specified user. If user is null no personal builds will be included into the list,
otherwise there will be personal builds for the specified user.includeCanceled - if canceled builds should be included.
- Returns:
- list of all finished builds sorted by build id (start order) descending.
@Nullable
PathMapping mapVcsPath(@NotNull
java.lang.String path)
path - a full path to a file (not necessarily existing)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||