jetbrains.buildServer
Interface BuildType

All Superinterfaces:
BuildTypeDescriptor, java.lang.Comparable<BuildTypeDescriptor>
All Known Subinterfaces:
RemoteBuildType, SBuildType

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
 BuildRunnerDescriptor findBuildRunnerByType(java.lang.String runnerType)
          Returns the first build runner of the specified type.
 Build getBuildByBuildNumber(java.lang.String buildNumber)
          Returns most recent build instance with specified build number.
 java.lang.String getBuildParameter(java.lang.String key)
          Returns build parameter by parameter key
 java.util.Map<java.lang.String,java.lang.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 considered
 java.util.List<? extends VcsModification> getModificationsSinceLastSuccessful()
          Returns all modifications made since last successfully finished build
 int getNumberQueued()
          Returns number of items for this build configurations currently waiting in queue (excluding personal builds).
 java.util.Map<java.lang.String,java.lang.String> getParameters()
          Returns map of build and configuration parameters.
 java.util.List<? extends VcsModification> getPendingChanges()
          Returns all changes already detected but not run.
 ResponsibilityEntry getResponsibilityInfo()
          Returns the information about responsibility on this build configuration.
 java.util.List<? extends RunningBuild> getRunningBuilds()
          Same as getRunningBuilds(null)
 java.util.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.
 java.util.List<? extends VcsRoot> getVcsRoots()
          Returns all roots currently attached to this configuration
 boolean isInQueue()
          Returns true if the configuration is queued at the moment (without taking into account personal builds).
 void removeResponsible(boolean buildWasFixed, User responsibleUser, java.lang.String comment, User whoPerformsTheAction)
          Removes responsible information , mark it is either 'fixed' or 'not fixed'.
 void setResponsible(User responsibleUser, java.lang.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
java.util.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
java.util.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 (without taking into account personal builds).

Returns:
true if configuration is queued, false otherwise.

getNumberQueued

int getNumberQueued()
Returns number of items for this build configurations currently waiting in queue (excluding personal builds).

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

java.util.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

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

Returns:
list of version control modifications, detected since last successfull 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
                    java.lang.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 null
userComment - user message. Will be shown in UI
reporterUser - user who performs the action. May be null for automated operations
Since:
4.0.2

removeResponsible

void removeResponsible(boolean buildWasFixed,
                       @Nullable
                       User responsibleUser,
                       @Nullable
                       java.lang.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 fixed
responsibleUser - User who performs the action. May be null for automated operations
comment - user message. Will be shown in UI
whoPerformsTheAction - 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
                                     java.lang.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
                                                     java.lang.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

java.lang.String getBuildParameter(java.lang.String key)
Returns build parameter by parameter key

Parameters:
key - parameter key
Returns:
build parameter by parameter key

getVcsRoots

java.util.List<? extends VcsRoot> getVcsRoots()
Returns all roots currently attached to this configuration

Returns:
collection of all attached vcs roots.

getBuildParameters

@NotNull
java.util.Map<java.lang.String,java.lang.String> getBuildParameters()
Returns the map of build parameters specified by user. For more details please see BuildTypeSettings.getBuildParameters() (server side).

Returns:
build parameters map
Since:
5.1
See Also:
getBuildParameter(String)

getParameters

@NotNull
java.util.Map<java.lang.String,java.lang.String> getParameters()
Returns map of build and configuration parameters.

Returns:
build and configuration parameters map
Since:
6.5