|
|||||||||
| 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 |
| Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.vcs.VcsLabelingSettings |
|---|
VcsLabelingSettings.LabelingType |
| Field Summary |
|---|
| Fields inherited from interface jetbrains.buildServer.serverSide.BuildTypeOptions |
|---|
BT_ALLOW_EXTERNAL_STATUS, BT_BUILD_NUMBER_PATTERN, 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, DEFAULT_BUILD_NUMBER_PATTERN |
| 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,
boolean changeScopeOfLocalRoots)
Attaches this build configuration to the specified template |
|
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. |
|
|
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 |
|
|
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. |
|
CustomDataStorage |
getCustomDataStorage(java.lang.String storageId)
Returns custom data storage associated with this build configuration. |
|
int |
getExecutionTimeoutMin()
Returns duration the build allowed to run until killed by the server. |
|
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<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) |
|
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. |
|
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. |
|
java.util.List<Dependency> |
getOwnDependencies()
Returns list of own dependencies (not inherited from a template). |
|
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 |
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(SProject target,
boolean changeScopeOfLocalRoots)
Moves this build configuration to the target project. |
|
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)
Chanegs 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.BuildType |
|---|
getBuildByBuildNumber, getBuildParameter, getBuildParameters, getNumberQueued, getParameters, getResponsibilityInfo, getStatus, getVcsRoots, isInQueue, removeResponsible, removeResponsible, setResponsible, setResponsible |
| Methods inherited from interface jetbrains.buildServer.BuildTypeDescriptor |
|---|
getBuildTypeId, getCheckoutType, getDescription, getFullName, getName, getProjectId, getProjectName, getRunnerTypes, 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.UserParametersHolder |
|---|
addParameter, getParameters, getParametersCollection, removeParameter |
| Methods inherited from interface jetbrains.buildServer.serverSide.vcs.VcsLabelingSettings |
|---|
getLabelingRoots, getLabelingType, getLabelPattern, setLabelingRoots, setLabelingType, setLabelPattern |
| Methods inherited from interface jetbrains.buildServer.serverSide.CompatibleAgents |
|---|
getAgentCompatibility, getCompatibilityMap, getCompatibleAgents |
| Methods inherited from interface jetbrains.buildServer.XmlExternalizable |
|---|
writeTo |
| Methods inherited from interface jetbrains.buildServer.serverSide.dependency.Dependent |
|---|
getChildDependencies, getDependencyReferences, getNumberOfDependencyReferences, intersectsWith |
| Methods inherited from interface jetbrains.buildServer.serverSide.dependency.DependencySettings |
|---|
addDependency, getDependencies, removeDependency |
| Methods inherited from interface jetbrains.buildServer.serverSide.ParametersSupport |
|---|
getParametersProvider, getValueResolver |
| Method Detail |
|---|
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.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()
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()
@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.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.
@NotNull java.io.File getArtifactsDirectory()
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 BuildType
@NotNull
java.lang.String getVcsSettingsHash(@NotNull
java.util.List<VcsRootInstanceEntry> vcsRootEntries)
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.
vcsRootEntries - vcs roots with checkout rules to get name hash for.
BuildTypeSettings.setCheckoutDirectory(String)@NotNull java.lang.String getVcsSettingsHash()
void releaseSources()
void releaseSources(@NotNull
SBuildAgent agent)
agent - agent@NotNull java.util.List<SBuildAgent> getAgentsWhereBuildConfigurationBuilt()
java.util.List<java.lang.String> getTags()
void 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
boolean 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
void moveToProject(@NotNull
SProject target,
boolean changeScopeOfLocalRoots)
target project.
target - the destination projectchangeScopeOfLocalRoots - if true then local VCS roots will be shared, if false local VCS roots will be copied to the target project
Note that local VCS roots will also be shared if BuildTypeSettings.isTemplateBased() returns true.
@Nullable
PathMapping mapVcsPath(@NotNull
java.lang.String path)
path - a full path to a file (not necessarily existing)
@NotNull java.lang.String getExtendedName()
SProject.getExtendedName()
@NotNull
byte[] getFileContent(@NotNull
java.lang.String relativePath)
throws VcsException
relativePath - - relative file path regarding to the project root,
"checkout root" from vcs root should not be included
VcsException - if some problem occurred while getting file content from the source control repository.
void attachToTemplate(@NotNull
BuildTypeTemplate template,
boolean changeScopeOfLocalRoots)
throws InvalidVcsRootScopeException
template - templatechangeScopeOfLocalRoots - if true then local non accessible VCS roots will be shared
InvalidVcsRootScopeException - if at least one of VCS roots from provided template is inaccessible in this build configuration and changeScopeOfLocalRoots == falsevoid detachFromTemplate()
void persist()
throws PersistFailedException
persist in interface BuildTypeSettingsPersistFailedException - if persisting failed@NotNull ResolvedSettings getResolvedSettings()
java.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.
@NotNull java.util.List<Dependency> getOwnDependencies()
@NotNull
CustomDataStorage getCustomDataStorage(@NotNull
java.lang.String storageId)
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.
@Nullable
SBuildRunnerDescriptor findBuildRunnerByType(@NotNull
java.lang.String runnerType)
findBuildRunnerByType in interface BuildTypefindBuildRunnerByType in interface BuildTypeSettingsrunnerType - type of the runner
@NotNull java.util.List<VcsRootInstanceEntry> getVcsRootInstanceEntries()
@Nullable
VcsRootInstance getVcsRootInstanceForParent(@NotNull
SVcsRoot parentRoot)
@NotNull java.util.List<VcsRootInstance> getVcsRootInstances()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||