Agent Tasks plugin for TeamCity
Java
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
src
License.txt
README
agentTasks.iml
teamcity-plugin.xml

README

Agent Tasks plugin for TeamCity
===============================

Allows to perform simple operations on a set of agents periodically (each day).
For now, the only supported operations are: enable and disable.
The set of agents can only be defined by regexp pattern on agent name.


Installation
============

1. Download binary distribution from:
http://teamcity.jetbrains.com/guestAuth/repository/download/bt333/lastSuccessful/agentTasks.zip

2. Put agentTasks.zip file under <TeamCity data directory>/plugins

3. Restart your TeamCity server

4. Navigate to Administration -> Server Configuration -> Plugins tab and check that Agent Tasks plugin is in the list.


Configuration
=============

Plugin loads configuration from: <TeamCity data directory>/config/agentTasks.properties file.
No server restart is required if you modify this file, plugin will detect changes and reload configuration.

In this configuration file you can define tasks using the following syntax:
agent.task.N = <HH:mm>,<enable|disable>,<agent name regexp>

Example:
agent.task.1 = 22:00,enable,dev-agent
agent.task.2 = 8:00,disable,dev-agent

These tasks will:
- enable all agents containing "dev-agent" in their names in the evening (on 22:00 each day)
- disable all these agents on the morning

Note that prefix "agent.task.N" must be different for each task. You can comment out a task with help of # character.

When configuration file changes, plugin will completely remove all previous tasks and create new.
For now, there is no way to specify dates, so you can't configure plugin to work during weekends only.
All tasks are executed each day.

When change is detected in agentTasks.properties file plugin will log messages into the teamcity-server.log like:
Loaded task: <enable|disable> agents matching <regexp> on <time>


How to build
============

To build plugin from source code you'll need IntelliJ IDEA Community Edition 10.5 or higher.
You can download it for free from JetBrains site: http://www.jetbrains.com/idea/download/index.html

TeamCity server must be installed too, as plugin depends on jar files from TeamCity.
You'll need to add IntelliJ IDEA Path Variable with name "TeamCityDistribution" pointing to TeamCity installation directory.

To build plugin use menu: Build -> Build 'agentTasks' artifact. If everything is configured correctly, the binary file "agentTasks.zip" will be created under the "dist" directory.
See "Installation" section for information how to install it in TeamCity.


Compatibility
================
Supported TeamCity versions: 6.5 and higher


License
================
Apache 2.0