Package jetbrains.buildServer
Interface BuildType
-
- All Superinterfaces:
BuildTypeDescriptor
,Comparable<BuildTypeDescriptor>
- All Known Subinterfaces:
BuildTypeEx
,RemoteBuildType
,RemoteBuildTypeEx
,SBuildType
- All Known Implementing Classes:
BuildTypeImpl
,DummyBuildType
,EditableBuildTypeCopy
,MockBuildType
,RemoteBuildTypeImpl
,SecuredBuildType
public interface BuildType extends BuildTypeDescriptor
Provides information about TeamCity build configuration and number of methods to work with it
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.BuildTypeDescriptor
BuildTypeDescriptor.CheckoutType
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.BuildTypeDescriptor
FULL_NAME_SEPARATOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BuildRunnerDescriptor
findBuildRunnerByType(String runnerType)
Returns the first build runner of the specified type.Build
getBuildByBuildNumber(String buildNumber)
Returns most recent build instance with specified build number.String
getBuildParameter(String key)
Returns build parameter by parameter keyMap<String,String>
getBuildParameters()
Returns the map of build parameters specified by user.Build
getLastChangesFinished()
Returns last finished instance for the build configuration with last user changes (personal builds and canceled builds are excluded).Build
getLastChangesSuccessfullyFinished()
Returns last successfully finished build in the configuration with last user changes, personal builds are not consideredList<? extends VcsModification>
getModificationsSinceLastSuccessful()
Returns all modifications made since last successfully finished buildint
getNumberQueued()
Returns number of items for this build configurations currently waiting in queueMap<String,String>
getParameters()
Returns map of build and configuration parameters.List<? extends VcsModification>
getPendingChanges()
Returns all changes already detected but not run.ResponsibilityEntry
getResponsibilityInfo()
Returns the information about responsibility on this build configuration.List<? extends RunningBuild>
getRunningBuilds()
Same as getRunningBuilds(null)List<? extends RunningBuild>
getRunningBuilds(User user)
Returns all running builds of this build configuration including personal.Status
getStatus()
Returns current status of the configuration.BuildTypeStatusDescriptor
getStatusDescriptor()
Returns current status of the configuration with text description and status build.List<? extends VcsRoot>
getVcsRoots()
Returns all roots currently attached to this configurationboolean
isInQueue()
Returns true if the configuration is queued at the momentvoid
removeResponsible(boolean buildWasFixed, User responsibleUser, String comment, User whoPerformsTheAction)
Removes responsible information , mark it is either 'fixed' or 'not fixed'.void
setResponsible(User responsibleUser, String userComment, User reporterUser)
Called when a user takes a responsibility for the build type.-
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
-
-
-
-
Method Detail
-
getRunningBuilds
@NotNull List<? extends RunningBuild> getRunningBuilds(@Nullable User user)
Returns all running builds of this build configuration including personal. If user is null all personal and non-personal builds of this build configuration are returned. If user is not null then personal builds of this user and non-personal builds are returned. List of running builds is sorted by build id in reverse order (most recent build first).- Parameters:
user
- owner of personal builds- Returns:
- list of running builds
-
getRunningBuilds
@NotNull List<? extends RunningBuild> getRunningBuilds()
Same as getRunningBuilds(null)- Returns:
- list of running builds
-
isInQueue
boolean isInQueue()
Returns true if the configuration is queued at the moment- Returns:
true
if configuration is queued,false
otherwise.
-
getNumberQueued
int getNumberQueued()
Returns number of items for this build configurations currently waiting in queue- Returns:
- number of queued builds of this configuration.
-
getStatus
Status getStatus()
Returns current status of the configuration.- Returns:
- configuration status, which is calculated according to statuses of all the running builds (except personal) plus latest finished one.
-
getStatusDescriptor
@NotNull BuildTypeStatusDescriptor getStatusDescriptor()
Returns current status of the configuration with text description and status build.- Returns:
- configuration status, which is calculated according to statuses of all the running builds (except personal) plus latest finished one.
-
getPendingChanges
List<? extends VcsModification> getPendingChanges()
Returns all changes already detected but not run.- Returns:
- list of version control modifications, which are detected but no build with these modifications is started yet.
-
getModificationsSinceLastSuccessful
List<? extends VcsModification> getModificationsSinceLastSuccessful()
Returns all modifications made since last successfully finished build- Returns:
- list of version control modifications, detected since last successful finished build has been finished
-
getResponsibilityInfo
@NotNull ResponsibilityEntry getResponsibilityInfo()
Returns the information about responsibility on this build configuration.- Returns:
- ResponsibilityEntry information for this build configuration
- See Also:
ResponsibilityEntry
,setResponsible(User, String, User)
,removeResponsible(boolean, User, String, User)
-
setResponsible
void setResponsible(@NotNull User responsibleUser, @Nullable String userComment, @Nullable User reporterUser)
Called when a user takes a responsibility for the build type.Clients are encouraged to use
BuildTypeResponsibilityFacade
service when possible, as it provides more flexibility.- Parameters:
responsibleUser
- responsible user. Not nulluserComment
- user message. Will be shown in UIreporterUser
- user who performs the action. May be null for automated operations- Since:
- 4.0.2
-
removeResponsible
void removeResponsible(boolean buildWasFixed, @Nullable User responsibleUser, @Nullable String comment, @Nullable User whoPerformsTheAction)
Removes responsible information , mark it is either 'fixed' or 'not fixed'.Clients are encouraged to use
BuildTypeResponsibilityFacade
service when possible, as it provides more flexibility.- Parameters:
buildWasFixed
- if true, build configuration will be marked as fixedresponsibleUser
- User who performs the action. May be null for automated operationscomment
- user message. Will be shown in UIwhoPerformsTheAction
- user who performs the action. May be null for automated operations- Since:
- 4.0.2
-
getLastChangesSuccessfullyFinished
@Nullable Build getLastChangesSuccessfullyFinished()
Returns last successfully finished build in the configuration with last user changes, personal builds are not considered- Returns:
- last successfully finished build in the configuration (excluding personal) or
null
if there are no successfully finished builds.
-
getLastChangesFinished
@Nullable Build getLastChangesFinished()
Returns last finished instance for the build configuration with last user changes (personal builds and canceled builds are excluded).- Returns:
- last finished build instance or
null
if no any build has been finished yet.
-
getBuildByBuildNumber
@Nullable Build getBuildByBuildNumber(@NotNull String buildNumber)
Returns most recent build instance with specified build number. Generally, build number is unique but duplicates may happen if manually reset at build configuration page.- Parameters:
buildNumber
- specified build number.- Returns:
- most recent build instance with the given number.
-
findBuildRunnerByType
@Nullable BuildRunnerDescriptor findBuildRunnerByType(@NotNull String runnerType)
Returns the first build runner of the specified type.- Parameters:
runnerType
- type of the runner- Returns:
- the first found runner or null
-
getBuildParameter
String getBuildParameter(String key)
Returns build parameter by parameter key- Parameters:
key
- parameter key- Returns:
- build parameter by parameter key
-
getVcsRoots
List<? extends VcsRoot> getVcsRoots()
Returns all roots currently attached to this configuration- Returns:
- collection of all attached vcs roots.
-
getBuildParameters
@NotNull Map<String,String> getBuildParameters()
Returns the map of build parameters specified by user. For more details please seeBuildTypeSettings.getBuildParameters()
(server side).- Returns:
- build parameters map
- Since:
- 5.1
- See Also:
getBuildParameter(String)
-
-