jetbrains.buildServer.serverSide
Interface SBuildType

All Superinterfaces:
BuildType, BuildTypeDescriptor, BuildTypeIdentity, BuildTypeOptions, BuildTypeSettings, java.lang.Comparable<BuildTypeDescriptor>, CompatibleAgents, DependencySettings, Dependent, InheritableUserParametersHolder, LVcsRootInstanceHolder, OptionSupport, ParametersSupport, ReadOnlyUserParameters, SPersistentEntity, UserParametersHolder, VcsLabelingSettings
All Known Subinterfaces:
RemoteBuildType

public interface SBuildType
extends BuildTypeIdentity, BuildType, BuildTypeSettings, CompatibleAgents, Dependent, ParametersSupport, LVcsRootInstanceHolder

This class represents TeamCity build configuration on the server-side.


Nested Class Summary
 
Nested classes/interfaces inherited from interface jetbrains.buildServer.BuildTypeDescriptor
BuildTypeDescriptor.CheckoutType
 
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.vcs.VcsLabelingSettings
VcsLabelingSettings.LabelingType
 
Field Summary
 
Fields inherited from interface jetbrains.buildServer.BuildTypeDescriptor
FULL_NAME_SEPARATOR
 
Fields inherited from interface jetbrains.buildServer.serverSide.BuildTypeOptions
BT_ALLOW_EXTERNAL_STATUS, BT_ALLOW_PERSONAL_BUILD_TRIGGERING, BT_ARTIFACT_RULES, BT_BUILD_NUMBER_PATTERN, BT_CHECKOUT_DIR, BT_CHECKOUT_MODE, 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_SHOW_DEPS_CHANGES, DEFAULT_BUILD_NUMBER_PATTERN, DEFAULT_VCS_LABELING_BRANCH_FILTER, VCS_LABELING_BRANCH_FILTER
 
Fields inherited from interface jetbrains.buildServer.serverSide.vcs.VcsLabelingSettings
DEFAULT_LABEL_PATTERN
 
Method Summary
 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 attachToTemplate(BuildTypeTemplate template)
          Attaches this build configuration to the specified template
 void attachToTemplate(BuildTypeTemplate template, boolean changeScopeOfLocalRoots)
          Deprecated. use attachToTemplate(BuildTypeTemplate)
 boolean belongsTo(SProject project)
          Returns true if the specified project or some of its subprojects (not only direct) contains this build configuration.
 void detachFromTemplate()
          Detaches template from the build configuration.
 SBuildRunnerDescriptor findBuildRunnerByType(java.lang.String runnerType)
          Returns first build runner of specified type or null
 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.
<T extends SBuildAgent>
AgentCompatibility
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.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()
          Returns interface to manipulate current build counter
<T extends BuildAgent>
java.util.List<T>
getCanRunAgents()
          Returns list of agents where this build configuration can run.
<T extends BuildAgent>
java.util.List<T>
getCanRunAndCompatibleAgents(boolean includeDisabled)
          Returns list of agents which are both allowed to run this configuration and are compatible with it.
 CustomDataStorage getCustomDataStorage(java.lang.String storageId)
          Returns custom data storage associated with this build configuration.
 java.util.List<SBuildType> getDependencyReferences()
          Returns list of build configurations directly referencing this build configuration.
 int getExecutionTimeoutMin()
          Returns duration the build allowed to run until killed by the server.
 java.lang.String getExtendedFullName()
          Returns the full name of build configuration with additional note if the project is archived.
 java.lang.String getExtendedName()
          Returns the name of build configuration with additional note if the project is archived.
 byte[] getFileContent(java.lang.String relativePath)
          Get binary content of the latest version of a file related to this build type.
 java.util.List<SFinishedBuild> getHistory()
          See also BuildHistory.processEntries(jetbrains.buildServer.util.ItemProcessor)
 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)
 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
 int getMaximumNumberOfBuilds()
          Returns maximum number of simultaneously running 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.
 int getNumberOfDependencyReferences()
          Returns number of dependency references (the number includes all references even those which are not available because of permissions)
 java.util.List<Dependency> getOwnDependencies()
          Returns list of own dependencies (not inherited from a template).
 java.util.List<VcsRootEntry> getOwnVcsRootEntries()
           
 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.
 ResolvedSettings getResolvedSettings()
          Returns resolved settings of this build configuration (with parameter references substituted)
 java.util.List<SRunningBuild> getRunningBuilds()
          Same as getRunningBuilds(null)
 java.util.List<SRunningBuild> getRunningBuilds(User user)
          See BuildType.getRunningBuilds(User)
 java.util.List<java.lang.String> getTags()
          List of all tags set for builds of this configuration.
 java.util.List<VcsRootInstanceEntry> getVcsRootInstanceEntries()
           
 VcsRootInstance getVcsRootInstanceForParent(SVcsRoot parentRoot)
           
 java.util.List<VcsRootInstance> getVcsRootInstances()
           
 java.lang.String getVcsRootsHash()
          Returns build configuration vcs roots hash without taking checkout directory into account
The resulting hash is an equal to the default checkout directory.
 java.lang.String getVcsSettingsHash()
          Returns build configuration vcs settings hash.
 java.lang.String getVcsSettingsHash(java.util.List<VcsRootInstanceEntry> 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(ConfigAction cause, SProject target)
          Moves this build configuration to the target project.
 void moveToProject(SProject target)
          Moves this build configuration to the target project.
 void moveToProject(SProject target, boolean changeScopeOfInaccessibleRoots)
          Deprecated. use moveToProject(SProject)
 void persist()
          Persists build configuration settings on disk, should be called each time when settings are changed, otherwise the changes will be lost after the server restart.
 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 setDescription(java.lang.String description)
          Changes configuration description.
 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.
 
Methods inherited from interface jetbrains.buildServer.serverSide.BuildTypeIdentity
getConfigurationFile, getExternalId, getFullName, getInternalId, getName, remove, setExternalId, setExternalId
 
Methods inherited from interface jetbrains.buildServer.serverSide.SPersistentEntity
getConfigId, getConfigurationFile, getParent, persist
 
Methods inherited from interface jetbrains.buildServer.BuildType
getBuildByBuildNumber, getBuildParameter, getBuildParameters, getNumberQueued, getParameters, getResponsibilityInfo, getStatus, getStatusDescriptor, getVcsRoots, isInQueue, removeResponsible, setResponsible
 
Methods inherited from interface jetbrains.buildServer.BuildTypeDescriptor
getBuildTypeId, getCheckoutType, getDescription, getExternalId, getFullName, getName, getProjectExternalId, getProjectId, getProjectName, getRunnerTypes, isPaused, isPersonal
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface jetbrains.buildServer.serverSide.BuildTypeSettings
addBuildFeature, addBuildFeature, addBuildParameter, addBuildRunner, addBuildRunner, addBuildTrigger, addBuildTrigger, addConfigParameter, addRequirement, addVcsRoot, applyRunnersOrder, containsVcsRoot, findBuildFeatureById, findBuildRunnerById, findRunnerParameter, findTriggerById, getArtifactDependencies, getArtifactPaths, getBuildFeatures, getBuildFeaturesOfType, getBuildNumberPattern, getBuildParameter, getBuildParameters, getBuildParametersCollection, getBuildRunners, getBuildTriggersCollection, getCheckoutDirectory, getCheckoutRules, getCheckoutType, getConfigParameters, getConfigParametersCollection, getImplicitRequirements, getRequirements, getRunnerTypes, getRunTypeRequirements, getTemplate, getTemplateId, getUndefinedParameters, getVcsRootEntries, getVcsRoots, isEnabled, isTemplateAccessible, isTemplateBased, persist, removeAllBuildRunners, removeBuildFeature, removeBuildParameter, removeBuildRunner, removeBuildTrigger, removeConfigParameter, removeRequirement, removeVcsRoot, replaceInValues, replaceInValues, setArtifactDependencies, setArtifactPaths, setBuildNumberPattern, setCheckoutDirectory, setCheckoutRules, setCheckoutType, setEnabled, textValueMatches, updateBuildFeature, updateBuildRunner, updateBuildTrigger
 
Methods inherited from interface jetbrains.buildServer.util.OptionSupport
getChangedOptions, getOption, getOptionDefaultValue, getOptions, getOwnOptions, setOption
 
Methods inherited from interface jetbrains.buildServer.serverSide.InheritableUserParametersHolder
getOwnParameters, getOwnParametersCollection, getParameters, getParametersCollection
 
Methods inherited from interface jetbrains.buildServer.serverSide.UserParametersHolder
addParameter, removeParameter
 
Methods inherited from interface jetbrains.buildServer.serverSide.vcs.VcsLabelingSettings
getLabelingRoots, getLabelingType, getLabelPattern
 
Methods inherited from interface jetbrains.buildServer.serverSide.CompatibleAgents
getAgentCompatibility, getCompatibilityMap, getCompatibleAgents
 
Methods inherited from interface jetbrains.buildServer.serverSide.dependency.Dependent
getChildDependencies, intersectsWith
 
Methods inherited from interface jetbrains.buildServer.serverSide.dependency.DependencySettings
addDependency, getDependencies, removeDependency
 
Methods inherited from interface jetbrains.buildServer.serverSide.ParametersSupport
getParametersProvider, getValueResolver
 
Methods inherited from interface jetbrains.buildServer.serverSide.LVcsRootInstanceHolder
getBuildTypeId, getName
 

Method Detail

getHistory

java.util.List<SFinishedBuild> getHistory()
See also BuildHistory.processEntries(jetbrains.buildServer.util.ItemProcessor)

Returns:
all non-cancelled builds non-personal builds for this build configuration, ordered by build start time descending (recent first)

getHistoryFull

java.util.List<SFinishedBuild> getHistoryFull(boolean orderByChanges)
See also BuildHistory.processEntries(String, jetbrains.buildServer.users.User, boolean, boolean, boolean, jetbrains.buildServer.util.ItemProcessor)

Parameters:
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:
all (including cancelled and personal builds) for this build configuration, ordered according to orderByChanges parameter.

getHistory

java.util.List<SFinishedBuild> getHistory(@Nullable
                                          User user,
                                          boolean includeCanceled,
                                          boolean orderByChanges)
Returns all finished builds, visible for the specified user of this configuration.

Parameters:
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.

getLastChangesStartedBuild

@Nullable
SBuild getLastChangesStartedBuild()
Returns instance of the build, finished or running, which contains latest changes in this build configuration

Returns:
build with latest changes

getAgentCompatibilities

java.util.List<AgentCompatibility> getAgentCompatibilities()
Returns information about what agent are compatible with the configuration, what are incompatible and why. AgentCompatibility are provided for all authorized agents.

Returns:
list of compatibility information holders.

getAgentCompatibility

<T extends SBuildAgent> AgentCompatibility getAgentCompatibility(@NotNull
                                                                 T agent)
Returns information about agent compatibility for the specified agent.

Parameters:
agent - the given agent.
Returns:
agent compatibility for the specified agent.

getCanRunAgents

<T extends BuildAgent> java.util.List<T> getCanRunAgents()
Returns list of agents where this build configuration can run. Build configuration can run on an agent if this agent is authorized and if agent run policy BuildAgentManager.RunConfigurationPolicy allows to run this build configuration. Note that this method does not consider agent pool associations.

Returns:
list of agents where this build configuration can run sorted by agent name

getCanRunAndCompatibleAgents

<T extends BuildAgent> java.util.List<T> getCanRunAndCompatibleAgents(boolean includeDisabled)
Returns list of agents which are both allowed to run this configuration and are compatible with it.

Parameters:
includeDisabled - true to include disabled agents in the list, by default they are excluded
Returns:
list of agents which are both allowed to run this configuration and are compatible with it.

getBuildNumbers

BuildNumbers getBuildNumbers()
Returns interface to manipulate current build counter

Returns:
see above

getRunningBuilds

@NotNull
java.util.List<SRunningBuild> getRunningBuilds(@Nullable
                                                       User user)
See BuildType.getRunningBuilds(User)

Specified by:
getRunningBuilds in interface BuildType
Parameters:
user - owner of personal builds
Returns:
list of running builds

getRunningBuilds

@NotNull
java.util.List<SRunningBuild> getRunningBuilds()
Same as getRunningBuilds(null)

Specified by:
getRunningBuilds in interface BuildType
Returns:
list of running builds

getLastChangesFinished

@Nullable
SFinishedBuild getLastChangesFinished()
Description copied from interface: BuildType
Returns last finished instance for the build configuration with last user changes (personal builds and canceled builds are excluded).

Specified by:
getLastChangesFinished in interface BuildType
Returns:
last finished build (ordered by changes) from the default branch.

getLastChangesSuccessfullyFinished

@Nullable
SFinishedBuild getLastChangesSuccessfullyFinished()
Description copied from interface: BuildType
Returns last successfully finished build in the configuration with last user changes, personal builds are not considered

Specified by:
getLastChangesSuccessfullyFinished in interface BuildType
Returns:
last successfully finished build (ordered by changes) from the default branch.

setPaused

@Deprecated
void setPaused(boolean paused,
                          User user)
Deprecated. use setPaused(boolean, jetbrains.buildServer.users.User, String)

Pause/unpause this build configuration. Paused build configuration is not triggered by VCS check-ins and time triggers.

Parameters:
paused - if configuration should be paused
user - use who is pausing the configuration
Since:
9.0.2 this method no longer persists build configuration on disk, you should call persist() method

setPaused

void setPaused(boolean paused,
               @Nullable
               User user,
               java.lang.String comment)
Pause/unpause this build configuration. Paused build configuration is not triggered by VCS check-ins and time triggers.

Parameters:
paused - if configuration should be paused
user - use who is pausing the configuration
comment - user comment
Since:
4.5, 9.0.2 this method no longer persists build configuration on disk, you should call persist() method

getPauseComment

@Nullable
Comment getPauseComment()
Returns comment for pausing/resuming this build type

Returns:
comment for pausing/resuming this build type
Since:
4.5

getProject

@NotNull
SProject getProject()
Returns parent project for the configuration.

Specified by:
getProject in interface BuildTypeIdentity
Specified by:
getProject in interface BuildTypeSettings
Returns:
parent project.

setName

void setName(@NotNull
             java.lang.String newName)
             throws DuplicateBuildTypeNameException,
                    BuildTypeRenamingFailedException
Renames this build configuration

Specified by:
setName in interface BuildTypeIdentity
Parameters:
newName - new name
Throws:
DuplicateBuildTypeNameException - if another build configuration with such name exists in the build configuration project
BuildTypeRenamingFailedException - if build configuration renaming failed
See Also:
BuildTypeIdentity.getName(), BuildTypeIdentity.getFullName()

setDescription

void setDescription(@Nullable
                    java.lang.String description)
Changes configuration description.

Parameters:
description - new configuration description.

getArtifactsReferences

java.util.List<SBuildType> getArtifactsReferences()
Returns list of build configurations which depend on this build configurations artifacts

Returns:
list of build configurations

getNumberOfArtifactReferences

int getNumberOfArtifactReferences()
Returns number of dependent build configuration having references to this build configuration. This number may be greater than the size of the list 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.

Returns:
see above

getArtifactsDirectory

@NotNull
java.io.File getArtifactsDirectory()
Returns directory containing artifacts of this build configuration.

Returns:
artifacts directory on the server.

getPendingChanges

java.util.List<SVcsModification> getPendingChanges()
Returns all changes already detected but not associated with a build.

Specified by:
getPendingChanges in interface BuildType
Returns:
list of version control modifications, which are detected but no build with these modifications is created yet.

getPendingChangesCommitters

java.util.Collection<SUser> getPendingChangesCommitters()
Returns pending changes committers to this build configuration

Returns:
see above
Since:
4.5

getModificationsSinceLastSuccessful

java.util.List<SVcsModification> getModificationsSinceLastSuccessful()
Returns all modifications made since last successfully finished build

Specified by:
getModificationsSinceLastSuccessful in interface BuildType
Returns:
list of version control modifications, detected since last successful finished build has been finished

getVcsSettingsHash

@NotNull
java.lang.String getVcsSettingsHash(@NotNull
                                            java.util.List<VcsRootInstanceEntry> vcsRootEntries)
Return name of the directory which should be used as checkout directory for this build configuration. In fact, this name is a generated hash which depends on VCS Roots associated with this build configuration and some other settings, such as CheckoutType BuildTypeDescriptor.getCheckoutType() and checkout rules BuildTypeSettings.getCheckoutRules(jetbrains.buildServer.vcs.VcsRoot) If checkout directory was specified explicitly for the build configuration, hash for this string is returned.

Parameters:
vcsRootEntries - vcs roots with checkout rules to get name hash for.
Returns:
name of the directory which will be used as last part of checkout directory, if this directory isn't set explicitly; otherwise hash for explicitly set checkout directory is returned
See Also:
BuildTypeSettings.setCheckoutDirectory(String)

getVcsSettingsHash

@NotNull
java.lang.String getVcsSettingsHash()
Returns build configuration vcs settings hash.
Note: be careful, when using this value for running build. Build type might already be updated

Returns:
see above
Since:
5.0

getVcsRootsHash

@NotNull
java.lang.String getVcsRootsHash()
Returns build configuration vcs roots hash without taking checkout directory into account
The resulting hash is an equal to the default checkout directory. Note: be careful, when using this value for running build. Build type might already be updated

Returns:
see above
Since:
9.1

releaseSources

void releaseSources()
Releases sources of the build configuration on ALL agents where this configuration built. After that full checkout will be performed when build of this configuration starts on such agents.


releaseSources

void releaseSources(@NotNull
                    SBuildAgent agent)
Releases sources of the build configuration on specified agent only. After that full checkout will be performed when build of this configuration starts on the specified agent.

Parameters:
agent - agent

getAgentsWhereBuildConfigurationBuilt

@NotNull
java.util.List<SBuildAgent> getAgentsWhereBuildConfigurationBuilt()
Returns list of agents (sorted by name) where this build configuration was ever built.

Returns:
see above

getTags

java.util.List<java.lang.String> getTags()
List of all tags set for builds of this configuration.

Returns:
union of tags for each build for the configuration.

forceCheckingForChanges

void forceCheckingForChanges()
Starts checking for changes for all VCS roots of this build configuration


addToQueue

@Nullable
SQueuedBuild addToQueue(@NotNull
                                 java.lang.String triggeredBy)
Adds build instance of the configuration to the queue with the specified requestor name.

Parameters:
triggeredBy - contains details about who triggered build, see also TriggeredByBuilder
Returns:
new queued build instance if there is no instances of this configuration in the queue, or previously added instance otherwise.

addToQueue

@Nullable
SQueuedBuild addToQueue(@NotNull
                                 BuildAgent agent,
                                 @NotNull
                                 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).

Parameters:
agent - specified agent.
triggeredBy - contains details about who triggered build, see also TriggeredByBuilder
Returns:
null if agent is not authorized, new SQueuedBuild instance if queue does not contain this configuration with specified agent and existing one otherwise

getQueuedBuilds

@NotNull
java.util.List<SQueuedBuild> getQueuedBuilds(@Nullable
                                                     User user)
If user is null returns all queued builds including all personal builds. If user is not null returns non personal queued builds and personal builds of the specified user.

Parameters:
user - user
Returns:
see above

isCleanBuild

boolean isCleanBuild()
Returns if all files on an agent machine should be deleted before the build is started.

Returns:
true, if agent has to clean all sources and download all sources from the server before each build of the configuration.
See Also:
BuildTypeOptions.BT_CLEAN_BUILD

isShouldFailBuildIfTestsFailed

boolean isShouldFailBuildIfTestsFailed()
Returns true if build of the configuration has to fail if there is failed test.

Returns:
true, if build has to became failed after at least one test failed, regardless of build script exit code.
See Also:
BuildTypeOptions.BT_FAIL_IF_TESTS_FAIL

getExecutionTimeoutMin

int getExecutionTimeoutMin()
Returns duration the build allowed to run until killed by the server.

Returns:
build execution timeout in minutes, timeout 0 means 'forever'
See Also:
BuildTypeOptions.BT_EXECUTION_TIMEOUT

getMaximumNumberOfBuilds

int getMaximumNumberOfBuilds()
Returns maximum number of simultaneously running builds. 0 means there is no limit on a number of builds.

Returns:
see above
See Also:
BuildTypeOptions.BT_MAX_RUNNING_BUILDS

isAllowExternalStatus

boolean isAllowExternalStatus()
Returns if viewing of the configuration status is allowed externally.

Returns:
if viewing of the configuration status is allowed externally.
See Also:
BuildTypeOptions.BT_ALLOW_EXTERNAL_STATUS

moveToProject

@Deprecated
void moveToProject(@NotNull
                              SProject target,
                              boolean changeScopeOfInaccessibleRoots)
                   throws InvalidVcsRootScopeException
Deprecated. use moveToProject(SProject)

Moves this build configuration to the target project.

Parameters:
target - the destination project
changeScopeOfInaccessibleRoots - not used since 8.0
Throws:
InvalidVcsRootScopeException - thrown since 8.0 if VCS roots used by this configuration will not be accessible in the target project

moveToProject

void moveToProject(@NotNull
                   SProject target)
                   throws InvalidVcsRootScopeException
Moves this build configuration to the target project.

Parameters:
target - the destination project
Throws:
InvalidVcsRootScopeException - if VCS roots used by this configuration will not be accessible in the target project
Since:
8.0

moveToProject

void moveToProject(@NotNull
                   ConfigAction cause,
                   @NotNull
                   SProject target)
                   throws InvalidVcsRootScopeException
Moves this build configuration to the target project.

Parameters:
cause - config action caused the change
target - the destination project
Throws:
InvalidVcsRootScopeException - if VCS roots used by this configuration will not be accessible in the target project
Since:
9.0

mapVcsPath

@Nullable
PathMapping mapVcsPath(@NotNull
                                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. (TODO serganch: describe the term "full VCS path" somewhere)

Parameters:
path - a full path to a file (not necessarily existing)
Returns:
the path mapping object or null if no mapping exists

getExtendedName

@NotNull
java.lang.String getExtendedName()
Returns the name of build configuration with additional note if the project is archived. Useful when archived build configurations should be shown together with non-archived.

Returns:
build configuration name
Since:
5.0
See Also:
SProject.getExtendedName()

getExtendedFullName

@NotNull
java.lang.String getExtendedFullName()
Returns the full name of build configuration with additional note if the project is archived. Useful when archived build configurations should be shown together with non-archived.

Returns:
build configuration name
Since:
8.0
See Also:
SProject.getExtendedFullName()

getFileContent

@NotNull
byte[] getFileContent(@NotNull
                              java.lang.String relativePath)
                      throws VcsException
Get binary content of the latest version of a file related to this build type.

Parameters:
relativePath - - relative file path regarding to the project root, "checkout root" from vcs root should not be included
Returns:
- specified file content, corresponding to the build type
Throws:
VcsException - if some problem occurred while getting file content from the source control repository.

attachToTemplate

@Deprecated
void attachToTemplate(@NotNull
                                 BuildTypeTemplate template,
                                 boolean changeScopeOfLocalRoots)
                      throws InvalidVcsRootScopeException,
                             CannotAttachToTemplateException
Deprecated. use attachToTemplate(BuildTypeTemplate)

Attaches this build configuration to the specified template

Parameters:
template - template
changeScopeOfLocalRoots - if true then local non accessible VCS roots will be shared (not used since 8.0)
Throws:
InvalidVcsRootScopeException - if at least one of VCS roots from provided template is inaccessible in this build configuration and changeScopeOfLocalRoots == false
CannotAttachToTemplateException - if template is not accessible from this build configuration
Since:
5.0

attachToTemplate

void attachToTemplate(@NotNull
                      BuildTypeTemplate template)
                      throws CannotAttachToTemplateException
Attaches this build configuration to the specified template

Parameters:
template - template
Throws:
CannotAttachToTemplateException - if template is not accessible from this build configuration
Since:
8.0

detachFromTemplate

void detachFromTemplate()
Detaches template from the build configuration. Template settings are copied to build configuration itself.

Since:
5.0

persist

void persist()
             throws PersistFailedException
Persists build configuration settings on disk, should be called each time when settings are changed, otherwise the changes will be lost after the server restart.

Specified by:
persist in interface BuildTypeIdentity
Specified by:
persist in interface BuildTypeSettings
Specified by:
persist in interface SPersistentEntity
Throws:
PersistFailedException - if persisting failed
Since:
5.0

getResolvedSettings

@NotNull
ResolvedSettings getResolvedSettings()
Returns resolved settings of this build configuration (with parameter references substituted)

Returns:
see above
Since:
5.0

getOwnDependencies

@NotNull
java.util.List<Dependency> getOwnDependencies()
Returns list of own dependencies (not inherited from a template).

Returns:
list of own dependencies
Since:
5.0

getCustomDataStorage

@NotNull
CustomDataStorage getCustomDataStorage(@NotNull
                                               java.lang.String storageId)
Returns custom data storage associated with this build configuration. Custom data storage allows to attach custom data to a build configuration. Example of custom data is a state of some plugin associated with this build type (not configuration of the plugin). Custom data will be automatically cleaned when build configuration is removed.

Parameters:
storageId - - id of the storage. Custom data storageIds starting with "teamcity" are reserved for TeamCity internal usages. To reduce probability of identifiers clashing plugins can use fully qualified names of their classes or package names as storageId.
Returns:
custom data storage
Since:
5.1

findBuildRunnerByType

@Nullable
SBuildRunnerDescriptor findBuildRunnerByType(@NotNull
                                                      java.lang.String runnerType)
Returns first build runner of specified type or null

Specified by:
findBuildRunnerByType in interface BuildType
Specified by:
findBuildRunnerByType in interface BuildTypeSettings
Parameters:
runnerType - type of the runner
Returns:
see above
Since:
6.0

getVcsRootInstanceEntries

@NotNull
java.util.List<VcsRootInstanceEntry> getVcsRootInstanceEntries()
Returns:
resolved VCS root entries (entries with resolved settings: VCS root parameters and checkout rules).
Since:
6.5

getVcsRootInstanceForParent

@Nullable
VcsRootInstance getVcsRootInstanceForParent(@NotNull
                                                     SVcsRoot parentRoot)
Returns:
VCS root instance for specified parentRoot. Parent VCS root must be attached to this configuration, otherwise null will be returned.
Since:
6.5

getVcsRootInstances

@NotNull
java.util.List<VcsRootInstance> getVcsRootInstances()
Returns:
collection of VCS root instances used in this build configuration.
Since:
6.5

belongsTo

boolean belongsTo(@NotNull
                  SProject project)
Returns true if the specified project or some of its subprojects (not only direct) contains this build configuration.

Specified by:
belongsTo in interface BuildTypeIdentity
Parameters:
project - project
Returns:
see above
Since:
8.0

getOwnVcsRootEntries

@NotNull
java.util.List<VcsRootEntry> getOwnVcsRootEntries()
Returns:
build configuration own VCS roots, i.e. it does not contain VCS roots inherited from template
Since:
8.0

getDependencyReferences

@NotNull
java.util.List<SBuildType> getDependencyReferences()
Returns list of build configurations directly referencing this build configuration. The returned list is filtered by current user permissions and may contain not all references.

Returns:
see above

getNumberOfDependencyReferences

int getNumberOfDependencyReferences()
Returns number of dependency references (the number includes all references even those which are not available because of permissions)

Returns:
see above