TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Bundled Development Package

Last modified: 20 April 2023

TeamCity comes bundled with a Development Package that can be used to start developing TeamCity plugins.

To get the package use .tar.gz or .exe. distribution. Upon installation, <TeamCity Home Directory> will have a devPackage directory which contains TeamCity open API binaries, javadoc, sources and archive with a sample plugin.

Sample Plugin



Building plugin with Apache Ant



  • edit build.properties file and set value for path.variable.teamcitydistribution property to path of <TeamCity Home Directory>

  • run ant dist in the plugin directory (Ant 1.7+ is recommended). The plugin distribution should be created in dist directory.

Building sample plugin in IntelliJ IDEA



  • Unpack <TeamCity Home Directory>\devPackage\samplePlugin.zip into a directory of your choice

  • Open the project in IDEA (the .ipr file should work OK in IntelliJ IDEA 8.1.4 and later (includinge IntelliJ IDEA 9.0 Community Edition))

  • On prompt to add path variable, set "TeamCityDistribution" path variable to the directory where TeamCity with debPackage is installed (<TeamCity Home Directory>).

  • Open Project Structure and ensure you have Project SDK with name "1.5" pointing to Sun JDK version 1.5 Running the server with plugin from IDEA

  • Either edit build.properties file to set path.variable.teamcitydistribution property or regenerate the build script from IDEA (execute "Generate Ant Build" with settings: single file, all other options unchecked).

If you use Ultimate edition of IntelliJ IDEA, you can start TeamCity's Tomcat right form the IDE:

  • Go to "server" run configuration settings and configure Application Server pointing it to <TeamCity Home Directory>

  • Run "server" run configuration. It will run run Ant create distribution task, deploy the plugin into ${user.home}/.BuildServer directory and runs TeamCity server.

If you use Community edition, see Building-plugin-with-Apache-Ant - you can run "deply" Ant build target right from Ant Build IDEA tool window and then start TeamCity manually.

Sample Plugin Functionality



The sample plugin adds "Click me!" button in the bottom of "Projects" page. Click it to navigate to the plugin description page.