Typical Plugins

Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 3.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.
Documentation Index

Typical Plugins 

In this section:

Custom build number

Custom VCS

See jetbrains.buildServer.vcs.VcsManager.

If custom VCS plugin requires some settings to be edited from the web UI, then it should also provide a JSP file for its settings. This JSP file should be placed into the plugin jar under the buildServerResources/ path. In the buildServerSpring.xml you should also configure webResourcesUnpacker (note that you should use your vcs name as a plugin name), see above.

In the JSP file you should use special custom tags for input fields, radio buttons and checkboxes that correspond to your VCS properties. These custom tags are located in the props tag library:

You can use JSP files of existing VCS plugins as an example.

Custom Notifiers

See some docs at http://code.google.com/p/buildbunny/wiki/CreateTeamcityNotifier

Custom template processing:
http://www.intellij.net/forums/thread.jspa?messageID=5187731

Build Result Tabs

Create subclass of ViewLogTab and attach it to the web place:
WebControllerManager.addPageExtension(WebPlace.VIEW_LOG_TAB, this)

Custom User Authentication

Custom authentication API is based on Sun JAAS API. To provide your own authentication scheme, you should provide a login module class which must implement interface javax.security.auth.spi.LoginModule and register it in the jetbrains.buildServer.serverSide.auth.LoginConfiguration.

For example:

CustomLoginModule.java

Now we should register this module in the server. To do so, we create a login module descriptor:

CustomLoginModuleDescriptor.java

Finally we should create build-server-plugin-ourUserAuth.xml as it is described above and write there CustomLoginModuleDescriptor bean:

Create a jar, put it into the WEB-INF/lib directory of the TeamCity server and restart it. When the server is started, you should be able to choose your custom plugin from the drop down list of the Administration -> Server Configuration page.

Writing a Custom Build Runner

Agent-side Part

Implement jetbrains.buildServer.agent.BuildRunner interface (you may also extend GenericProgramRunner or even JavaProgramRunner helpers for this). To log your messages, you may obtain instance of ServerLogger singleton (you may also use ServerLoggerFacade for convinience).

TBD

Server-side Part

Build agent plugin should also provide server side jar with a class implementing jetbrains.buildServer.serverSide.RunType interface. The implementation of the RunType interface must be registered in the jetbrains.buildServer.serverSide.RunTypeRegistry. You can do this in the constructor of the RunType implementation, like this:

Please note that you should also provide the plugin descriptor file named build-server-plugin-<unique_plugin_name>.xml which will contain reference to the RunType implementation:

Labels:

plugin plugin Delete
vcs vcs Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. May 13, 2008

    I don't see any methods of WebControllerManager's object with name addViewLogTab(aPluginName, this)

    1. May 15, 2008

      Thank you, the page is updated.