TeamCity 7.0 Help

Open API Changes

Changes from 7.0 to 7.1

  • new API calls AgentRunningBuild#stopBuild and AgentRunningBuild#getInterruptReason(). (Those methods were in AgentRunningBuildEx since 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) and BuildStatistics.getAllTests()

  • event-method projectCreated of j.b.serverSide.BuildServerListener and j.b.serverSide.BuildServerAdapter now receives two parameters: projectId and user.

  • no longer publish AntTaskExtension*, AntUtil, TestNGUtil, ElementPatch, JavaTaskExtensionHelper classes to openapi package. Those classes can still be found in <teamcity>/webapps/ROOT/WEB-INF/plugins/ant/agent/antPlugin.zip!antPlugin/ant-runtime.jar

  • Notificator interface: methods notifyResponsibleChanged and notifyResponsibleAssigned changed second parameter from j.b.serverSide.ResponsibilityInfo to j.b.responsibility.ResponsibilityEntry (due to ResponsibilityInfo deprecation).

  • j.b.serverSide.BuildServerListener - we've deprecated responsibleChanged method which used j.b.serverSide.ResponsibilityInfo parameter and added a similar method which uses j.b.responsibility.ResponsibilityEntry

  • new API calls: j.b.agent.AgentRunningBuild.getBuildFeatures() and j.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) and j.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.Status class. If you used some of the classes (for example, j.b.messages.serviceMessages.BuildStatus class) and want to make your code compatible with TeamCity versions 6.0 - 7.0, please use j.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 removed beforeBuildFinish(SRunningBuild, boolean) method which was deprecated since TeamCity 3.1, there is another method beforeBuildFinish(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.TestNameBean are removed from the Open API. Interfaces j.b.serverSide.STest, j.b.serverSide.STestRun should be used instead.

  • j.b.serverSide.ShortStatistics.getFailedTests(), j.b.serverSide.BuildStatistics.getIgnoredTests() and j.b.serverSide.BuildStatistics.getPassedTests() return the list of j.b.serverSide.STestRun accordingly.

  • Classes j.b.tests.TestName and j.b.tests.SuiteTestName are combined together into j.b.tests.TestName.

Changes from 5.1.2 to 6.0

  • j.b.vcs.TriggerRules class 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.ServiceMessageTranslator is 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.AgentRunningBuild does not extend j.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.Anchor

  • deprecated class removed: j.b.notification.TemplatePatternProcessor; j.b.notification.TemplateProcessor added instead, see Extending Notification Templates Model

  • method removed: j.b.notification.TemplateMessageBuilder.setPatternProcessor()

  • several methods in j.b.serverSide.SBuildType now return boolean instead of void. 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

Last modified: 20 April 2023