Open API Changes
Changes from 9.0 to 9.1
Issue Trackers integration API changes
IssueProviderTypehas been extracted as a separate class. It serves as issue tracker integration descriptor and contains id, display name and URLs to controller and issue rendering pagesAbstractIssueProviderFactorynow takesIssueProviderTypeas an argument rather type as a String To be compatible with 9.1, existing plugins must implementIssueProviderTypeand change the corresponding provider factory according to base class interface. This change in Github integration plugin can be taken as an example
Changes from 8.1.x to 9.0
Server API changes
jetbrains.buildServer.serverSide.dependency.Dependent#getDependencyReferencesandjetbrains.buildServer.serverSide.dependency.Dependent#getNumberOfDependencyReferenceswere moved tojetbrains.buildServer.serverSide.SBuildType
jetbrains.buildServer.issueTracker.IssueProviderFactory#getDisplayNamedisplay name for issue tracker in UI.
Changes from 7.1.x to 8.0
External ID -related changes
jetbrains.buildServer.serverSide.dependency.DependencyFactory#createDependencynow accepts external ID instead of internal one, usejetbrains.buildServer.serverSide.dependency.DependencyFactory#createDependencyByInternalIdfor internal ID.jetbrains.buildServer.serverSide.ArtifactDependencyFactory#createArtifactDependencynow accepts external ID instead of internal one, usejetbrains.buildServer.serverSide.ArtifactDependencyFactory#createArtifactDependencyByInternalIdfor internal ID.
Common API changes
SimpleCommandLineProcessRunner.RunCommandEvents=>SimpleCommandLineProcessRunner.ProcessRunCallbackadded
jetbrains.buildServer.serverSide.CachePathsfor plugins to get cache directory on serverjetbrains.buildServer.serverSide.statistics.ValueType#getFormatnow returns String constant representing format stylejetbrains.buildServer.serverSide.statistics.ValueType#getColornow returns String containing Web Color
Server API changes
Added
jetbrains.buildServer.serverSide.SProject#getPluginDataDirectorythat returns per-project plugin data directoryjetbrains.buildServer.serverSide.BuildTypeSettings#addBuildRunnernot acceptsjetbrains.buildServer.serverSide.BuildRunnerDescriptorinstead of *S*BuildRunnerDescriptorjetbrains.buildServer.serverSide.TeamCityPropertiesno longer contains static methods to compute TeamCity Data Directory. Usejetbrains.buildServer.serverSide.ServerPathsspring bean insteadjetbrains.buildServer.serverSide.buildDistribution.AgentsFilterContextnow containsgetCustomDataandsetCustomDatamethods. Agent filters can now store data there to be used during distribution/filtering processadded
jetbrains.buildServer.serverSide.buildDistribution.DefaultAgentsFilterContext. Contains default implementation of custom data storage
Authentication API changes
Changes in
jetbrains.buildServer.serverSide.auth.LoginConfigurationclass:registerLoginModule(LoginModuleDescriptor)method is deprecated, useregisterAuthMethodType(AuthMethodType)insteadgetSelectedLoginModuleDescriptor()method is deprecated, usegetConfiguredLoginModules()insteadcreateJAASConfiguration()method is deprecated, usecreateJAASConfiguration(AuthMethod)insteadgetAuthType()method now always returns the value"mixed"and is deprecated, usegetConfiguredAuthMethods(Class)orisAuthMethodConfigured(Class)instead
Changes in
jetbrains.buildServer.serverSide.auth.LoginModuleDescriptorclass:jetbrains.buildServer.serverSide.auth.LoginModuleDescriptorAdapterclass was added, extend your implementation from this class to not depend on future changes inLoginModuleDescriptorgetOptions()method is deprecated, you need to implementgetJAASOptions(Map)methodLoginModuleDescriptorinterface now extendsjetbrains.buildServer.serverSide.auth.AuthMethodTypeinterface and it contains some new methods you need to implement (or just use the adapter mentioned above)
Changes in
javax.security.auth.spi.LoginModuleclass:Message from
javax.security.auth.login.FailedLoginExceptionthrown fromjavax.security.auth.spi.LoginModuleis now visible to user as is on login pageLogin module should now store own user name in TeamCity user's properties if it can differ from TeamCity's login. On login attempt login module must find existing user with the specified value of that property and return TeamCity's login for that user or return own user name if user does not exist yet. Use
jetbrains.buildServer.serverSide.auth.LoginModuleUtil#getUserModel(Map)to getjetbrains.buildServer.users.UserModelin login module.
You need now call
jetbrains.buildServer.serverSide.auth.ServerPrincipal#setCreatingNewUserAllowed(true)if you want TeamCity to create the specified user in case he/she does not exist yet.
VCS API changes
General
Non-required VcsManager::registerVcsSupport method have been removed.
tests-related constructors from
jetbrains.buildServer.vcs.ModificationDatawere moved tojetbrains.buildServer.vcs.ModificationDataForTestmost methods from
jetbrains.buildServer.vcs.VcsSupportUtilmoved to parent classjetbrains.buildServer.vcs.utils.VcsSupportUtilVcsExceptionclass no longer havesetRoot,getRoot,prependMessagemethods that are not designed to be used for vcs-plugins, in core-related tasks usejetbrains.buildServer.vcs.VcsRootVcsExceptionadded method
jetbrains.buildServer.vcs.VcsSupportContext#getVcsExtensionfor Vcs plugin context, override this method to provide additional services from pluginjetbrains.buildServer.vcs.VcsSupport#ignoreServerCachesForno longer be called, please migrate to post TeamCity 4.5 API
Patch building
jetbrains.buildServer.vcs.patches.PatchBuilderno longer extendsjetbrains.buildServer.vcs.patches.PatchBuilderBase. All methods fromjetbrains.buildServer.vcs.patches.PatchBuilderBasewere moved intojetbrains.buildServer.vcs.patches.PatchBuilderjetbrains.buildServer.vcs.patches.PatchBuilderEx#setTimeStampwas removed, usejetbrains.buildServer.vcs.patches.PatchBuilder#setLastModifiedjetbrains.buildServer.vcs.patches.PatchBuildercode was covered with@NotNull/@Nullableannotations
Access to VCS Services
Vcs API is split into two parts: VCS plugin api, which is used to implement VCS services in TeamCity, and VCS usage api, or just VCS API, which is used to work with VCS services from within TeamCity.
jetbrains.buildServer.vcs.VcsManager#getAllVcsis replaced withjetbrains.buildServer.vcs.VcsManager#getAllVcsCoreIntroduced
jetbrains.buildServer.vcs.VcsRootInstance#findServicemethod to obtain a VcsServicejetbrains.buildServer.vcs.VcsManager#getVcsUsernamesreturn type has changed from VcsSupportContext to VcsSupportCore in the key of the returned Map.
Changes from 7.0 to 7.1
new API calls
AgentRunningBuild#stopBuildandAgentRunningBuild#getInterruptReason(). (Those methods were inAgentRunningBuildExsince 6.5)
Responsibility API changes:
Added:
jetbrains.buildServer.responsibility.ResponsibilityEntry
enum RemoveMethod
jetbrains.buildServer.responsibility.ResponsibilityEntry jetbrains.buildServer.serverSide.ResponsibilityInfo jetbrains.buildServer.serverSide.ResponsibilityInfoData jetbrains.buildServer.tests.TestResponsibilityData
getRemoveMethod()
jetbrains.buildServer.responsibility.ResponsibilityEntryFactory
createEntry(BuildType)
jetbrains.buildServer.responsibility.impl.BuildTypeResponsibilityEntryImpl
constructor(BuildType)
jetbrains.buildServer.web.functions.user.ResposibilityFunctions
isUserResponsible(ResponsibilityEntry, User)
Changed:
jetbrains.buildServer.responsibility.impl.BuildTypeResponsibilityEntryImpl
constructor(BuildType, State, User, User, Date, String, RemoveMethod)
jetbrains.buildServer.responsibility.ResponsibilityEntryFactory
createEntry(BuildType, State, User, User, Date, String, RemoveMethod)
createEntry(TestName, long, State, User, User, Date, String, String, RemoveMethod)
jetbrains.buildServer.BuildType
getResponsibilityInfo() now returns ResponsibilityEntry
jetbrains.buildServer.serverProxy.RemoteBuildServer
updateResponsibility(Vector, String, String, String, String, String)
Removed (deprecated):
jetbrains.buildServer.serverSide.ResponsibilityInfo
createInactive()
createInactive(String, boolean, User)
getSince()
getUser()
getUserWhoPerformsTheAction()
isActive()
isFixed()
setUser(User)
jetbrains.buildServer.serverSide.ResponsibilityInfoData
isActive()
isFixed()
jetbrains.buildServer.BuildType
removeResponsible(boolean, User, String)
setResponsible(User, String)
jetbrains.buildServer.serverProxy.RemoteBuildServer
removeResponsible(String, boolean, String)
removeResponsible(String, boolean, String, String)
resetResponsible(String, String)
resetResponsible(Vector, String, boolean, String, String, String)
setIsFixed(String, String, String)
setResponsible(String, String, String)
setResponsible(String, String, String, String)
setResponsible(Vector, String, String, String, String)
jetbrains.buildServer.serverSide.BuildServerListener
jetbrains.buildServer.serverSide.BuildServerAdapter
responsibleChanged(SBuildType, ResponsibilityInfo, ResponsibilityInfo, boolean)
jetbrains.buildServer.responsibility.SBuildTypeResponsibilityFacade
jetbrains.buildServer.responsibility.STestNameResponsibilityFacade
Removed:
jetbrains.buildServer.serverSide.problems.BuildProblem and all implementations
jetbrains.buildServer.serverSide.problems.BuildProblemsProvider and all implementations
jetbrains.buildServer.serverSide.problems.BuildProblemsVisitor
jetbrains.buildServer.serverSide.SBuild
getBuildProblems()
visitBuildProblems(BuildProblemsVisitor)
JavaScript: Activator is now BS.Activator and its source file has been moved from js/activation.js to js/bs/activation.js
Changes from 6.5 to 7.0
new API calls:
BuildStatistics.findTestBy(TestName)andBuildStatistics.getAllTests()
event-method
projectCreatedofj.b.serverSide.BuildServerListenerandj.b.serverSide.BuildServerAdapternow receives two parameters:projectIdanduser.
no longer publish
AntTaskExtension*, AntUtil, TestNGUtil, ElementPatch, JavaTaskExtensionHelperclasses to openapi package. Those classes can still be found in <teamcity>/webapps/ROOT/WEB-INF/plugins/ant/agent/antPlugin.zip!antPlugin/ant-runtime.jar
Notificatorinterface: methodsnotifyResponsibleChangedandnotifyResponsibleAssignedchanged second parameter fromj.b.serverSide.ResponsibilityInfotoj.b.responsibility.ResponsibilityEntry(due to ResponsibilityInfo deprecation).
j.b.serverSide.BuildServerListener- we've deprecatedresponsibleChangedmethod which usedj.b.serverSide.ResponsibilityInfoparameter and added a similar method which usesj.b.responsibility.ResponsibilityEntry
new API calls:
j.b.agent.AgentRunningBuild.getBuildFeatures()andj.b.agent.AgentRunningBuild.getBuildFeaturesOfType(String). With help of these methods you can access build features enabled for the current build with all parameters properly resolved.
new API calls:
j.b.serverSide.BuildTypeSettings.isEnabled(String)andj.b.serverSide.BuildTypeSettings.setEnabled(String, boolean). These calls allow to enable / disable a setting with specified id (build runner, trigger or build feature), or check if it is enabled.
Classes from serviceMessages.jar no longer depend on
j.b.messages.Statusclass. If you used some of the classes (for example,j.b.messages.serviceMessages.BuildStatusclass) and want to make your code compatible with TeamCity versions 6.0 - 7.0, please usej.b.messages.serviceMessages.ServiceMessage.asString(...)methods.
new API extension point to filter all build messages:
j.b.messages.BuildMessagesTranslator
j.b.serverSide.BuildServerListener- we've removedbeforeBuildFinish(SRunningBuild, boolean)method which was deprecated since TeamCity 3.1, there is another methodbeforeBuildFinish(SRunningBuild)which can be used instead.
Changes from 6.0 to 6.5
Classes
j.b.serverSide.TestBlockBean,j.b.serverSide.TestInProject,j.b.serverSide.FailedTestBean,j.b.TestNameBeanare removed from the Open API. Interfacesj.b.serverSide.STest,j.b.serverSide.STestRunshould be used instead.j.b.serverSide.ShortStatistics.getFailedTests(),j.b.serverSide.BuildStatistics.getIgnoredTests()andj.b.serverSide.BuildStatistics.getPassedTests()return the list ofj.b.serverSide.STestRunaccordingly.Classes
j.b.tests.TestNameandj.b.tests.SuiteTestNameare combined together intoj.b.tests.TestName.
Changes from 5.1.2 to 6.0
j.b.vcs.TriggerRulesclass was removed from Open API as part of API cleanup. Please let us know if your plugin is affected by the change.
New responsibility event methods added:
j.b.serverSide.BuildServerListener.responsibleChanged(SProject, Collection<SuiteTestName>, ResponsibilityEntry, boolean).j.b.notification.Notificator.notifyResponsibleChanged(Collection<SuiteTestName>, ResponsibilityEntry, SProject, Set<SUser>),j.b.notification.Notificator.notifyResponsibleAssigned(Collection<SuiteTestName>, ResponsibilityEntry, SProject, Set<SUser>).j.b.notification.NotificationEventListener.responsibleChanged(SProject, Collection<SuiteTestName>, ResponsibilityEntry, boolean).j.b.messages.ServiceMessageTranslatoris reworked to allow binding to arbitrary message type by name instead of only known types
Most methods in j.b.agent.AgentLifeCycleListener interface were extended to receive j.b.agent.BuildRunnerContext.
j.b.agent.AgentLifeCycleListener#runnerFinished(...) method added. It is called after build step is finished.
j.b.agent.duplicates.DuplicatesReporter and j.b.duplicator.DuplicateInfo are added for reporting code duplicates on agent side.
Build Agent changes:
j.b.agent.AgentRunningBuilddoes not extendj.b.agent.AgentBuildInfo,j.b.agent.ResolvedParameters. All methods from those interfaces were inlined into AgentRunningBuild interface.
Most methods from j.b.agent.AgentRunningBuild were splitted into j.b.agent.BuildRunnerContext and j.b.agent.BuildContext. We have added
Parameters required for build runner are represented with j.b.agent.BuildRunnerContext interface. Every time AgentRunningBuild and BuildRunnerContext return resolved parameters back.
j.b.agent.BuildRunnerContext represents the context of current build runner. All add* methods modifies context for the runner. Those changes will be reverted whene context is switched to next runner.
j.b.agent.AgentRunningBuild provides a context of a build (i.e. shared between all runners). All addShared* methods modifies the build context (and thus all build runner contexts).
j.b.agent.BuildAgentConfiguration now contains getBuildParameters() and getConfigParameters() methods to access parameters. Configuration parameters here are formed from properties from buildAgent.properties that does not start from 'system.' or 'env.' prefix. All parameters are returned with all references resolved.
j.b.agent.AgentBuildRunner#createBuildProcess method signature has been changed to receive j.b.agent.BuildRunnerContext.
j.b.agent.CommandLineBuildService#initialize(...) method signature has been changed to receive j.b.agent.BuildRunnerContext.
j.b.agent.CommandLineBuildService#getRunnerContext(...) added
j.b.agent.CommandLineBuildService#afterProcessSuccessfullyFinished() added
j.b.agent.BuildServiceAdapter is added to simplify as proposed base class for commandline base build runner service.
Changes from 5.0 to 5.1
Web extensions:
deprecated method removed:
j.b.web.openapi.WebControllerManager.addPageExtension(final WebPlace addTo, final WebExtension extension, Anchor<WebExtension> anchor)deprecated class removed:
j.b.serverSide.Anchordeprecated class removed:
j.b.notification.TemplatePatternProcessor;j.b.notification.TemplateProcessoradded instead, see Extending Notification Templates Modelmethod removed:
j.b.notification.TemplateMessageBuilder.setPatternProcessor()several methods in
j.b.serverSide.SBuildTypenow returnbooleaninstead ofvoid. You will probably need to recompile your plugins that use the interface.
Changes from 4.5.5 to 5.0
Parameters
j.b.serverSide.parameters.AbstractBuildParameterReferencesProvider is renamed to j.b.serverSide.parameters.AbstractBuildParametersProvider j.b.serverSide.parameters.BuildParameterReferencesProvider is renamed into j.b.serverSide.parameters.BuildParametersProvider BuildParameterReferencesProvider.getParameters(@NotNull final SBuild build) changed signature to getParameters(@NotNull final SBuild build, final boolean emulationMode) j.b.agent.BuildAgentConfiguration#getCacheDirectory now receives String as argument j.b.serverSide.buildDistribution.StartBuildPrecondition#canStart second parameters (Map<QueuedBuildInfo, BuildAgent>) may contain null values for some queued builds
Miscellaneous
Added new build server events: j.b.serverSide.BuildServerListener.vcsRootRemoved(SVcsRoot), j.b.serverSide.BuildServerListener.responsibleChanged(SProject, TestNameResponsibilityEntry, TestNameResponsibilityEntry, boolean)
Added three notification methods: j.b.notification.Notificator.notifyResponsibleAssigned(SBuildType, Set<SUser>), j.b.notification.Notificator.notifyResponsibleChanged(TestNameResponsibilityEntry, TestNameResponsibilityEntry, SProject, Set<SUser>), j.b.notification.Notificator.notifyResponsibleAssigned(TestNameResponsibilityEntry, TestNameResponsibilityEntry, SProject, Set<SUser>)
Changes prior to 4.5.5
Not documented