Agent-Side Extensions

Search
Searching TeamCity 4.x Documentation
Table of Contents

Currently, there are two ways to extend a Build Agent:

  • Write a custom build runner
  • Write an extension to Ant Runner (for instance, to process custom tasks)

In this section:

Plugin Descriptor

Spring container is used on the agent and server side. An example of plugin descriptor file is described in the Server-Side Extensions section.

Package your build agent plugin as a zip archive with the following content:

<pluginName>
 <pluginName>/lib/
 <pluginName>/lib/pluginJar1.jar
 <pluginName>/lib/pluginJar2.jar
 <pluginName>/otherDir/
 <pluginName>/otherDir/someFile.txt

This archive will be unpacked in the plugins subdirectory during the build agent installation:

buildAgent/
 buildAgent/bin/
 buildAgent/lib/
 buildAgent/plugins/<pluginName>/
 buildAgent/plugins/<pluginName>/lib/pluginJar1.jar
 buildAgent/plugins/<pluginName>/lib/pluginJar2.jar
 buildAgent/plugins/<pluginName>/otherDir/
 buildAgent/plugins/<pluginName>/otherDir/someFile.txt

Writing an Ant Extension

  1. Implement jetbrains.buildServer.agent.ant.AntTaskExtension interface.
  2. Register it as a component in build-agent-plugin.xml file.

Deployment

To deploy a build agent plugin:

  1. Copy a build agent plugin's zip archive to the /update/plugins directory on the TeamCity server.
  2. If necessary, install the server part of the plugin. If the server part was modified, restart TeamCity server.
    Agents will download the updated plugin automatically.

Labels

 
  1. Apr 24, 2008

    Yegor Yarko says:

    Agent plugin sample: