Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Agent Tasks plugin for TeamCity
Java
Branch: master
Failed to load latest commit information.
.idea path variable name changed
src TW-21275 HOUR -> HOUR_OF_DAY
License.txt license
README fix link
agentTasks.iml initial version of agent tasks plugin
teamcity-plugin.xml README

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

Something went wrong with that request. Please try again.