General Info
| Vendor | JetBrains |
| License | Apache 2.0 |
| Type | free, open-source |
Plugin Description
Implements several TeamCity extension points with Groovy code. The code can be changed at run-time (by modifying a file under .BuildServer on disk). Provides several useful properties out of the box.
Please note that plugin is meant for demonstration purposes and if you plan to use it on a large active TeamCity installation you should consider implementing the functionality you need in a plain Java plugin.
Installation
- put libraries under application_libs into WEB-INF/lib directory of TeamCity web application (This step should also be repeated if you reinstall/upgrade TeamCity)
- put plugin groovyPlug.zip into .BuildServer/plugins
- restart the server
- if you edited the scripts earlier and need to use the newly introduced features, rename .BuildServer/config/_groovyPlug_/*.dist files dropping .dist suffix.
- It is recommended to ensure you have at least 150m set to -XX:MaxPermSize JVM option.
Usage
Edit files in .BuildServer/config/_groovyPlug_ and see the effect immediately without restarting the server.
| This section describe the current state of the plugin. Earlier versions might have differences in property sets and naming. See History for details. Also, no guarantees are made as to future plugin versions: the property set can change and properties renamed. |
Plugin implements the following extension points:
| Extension point | Implementation description |
|---|---|
| ParametersPreprocessor | empty demo extension |
| BuildParametersProvider | Provides build properties: system.build.start.date / env.BUILD_START_DATE system.build.start.time / env.BUILD_START_TIME system.build.vcs.lastIncluded.revision.<simplified VCS root name> / env.BUILD_VCS_LASTINCLUDED_REVISION_<simplified VCS root name in uppercase> - the revision of the last change of the noted VCS root included into the build. If there is only single VCS root, .<simplified VCS root name> may be omitted. system.build.vcs.lastIncluded.timestamp.<simplified VCS root name> / env.BUILD_VCS_LASTINCLUDED_TIMESTAMP_<simplified VCS root name in uppercase> - the timestamp of the last change of the noted VCS root included into the build. If there is only single VCS root, .<simplified VCS root name> may be omitted. build.triggeredBy / build.triggeredBy.username runParam.<name of run parameter> - Beware: this exposes build configuration settings to a user that can run the build (via custom build) |
| StartBuildPrecondition | To use the feature, add system.locks.readLock.<lockName> or system.locks.writeLock.<lockName> property to the build configuration. The build with writeLock will only start when there are no builds running with read or write locks of the same name. The build with readLock will only start when there are no builds running with write lock of the same name. |
| BuildServerListener | Empty implementation. Allows to perform actions on various build and server events. |
| TemplateProcessor | since TeamCity 5.1 Sample implementation. Allows to add objects to model used within notification templates. |
TeamCity Versions Compatibility
The trunk plugin version should work with the latest TeamCity public build (EAP or release).
There are also branch builds compatible with TeamCity 4.5.x, 5.0.x, 5.1.x, 6.0.x and 6.5.x. See Download section.
Development links
See Download section for CI builds.
Sources (sources corresponding to the latest TeamCity EAP can be found under trunk.
Download
From CI server:
trunk compatible with TeamCity 7.x
branch compatible with TeamCity 6.5.x
branch compatible with TeamCity 6.0.x
branch compatible with TeamCity 5.0.x
branch compatible with TeamCity 4.x
Related Materials
Issues:
TW-1643
TW-3798
TW-4502
TW-4080
TW-4527
TW-6619
TW-6784
History
| Date | Changes |
|---|---|
| June, 9, 2011 | Updated plugin for compatibility with TeamCity 6.5 |
| January, 25, 2010 | Fix TW-10816 |
| October, 16, 2009 | rename env.BUILD_VCS_LASTCHANGE_TIMESTAMP into env.BUILD_VCS_LASTINCLUDED_TIMESTAMP rename system.build.lastChange.time into system.build.vcs.lastIncluded.timestamp}} remove build.vcs.lastIncluded.revision configuration property (use system.build.vcs.lastIncluded.revision instead) fix typo in build.vcs.lastIncluded.revision system property name (was build.vcs.lastIncluided.revision) If you modified the default scripts before, please note that they are renamed too: GroovyReferencePropertiesProvider renamed into GroovyPropertiesProvider GroovyPropertyProvider renamed to GroovyParametersPreprocessor (and is empty by default) If you do not want to upgrade, use latest build without these changes |
| October, 12, 2009 | Make compatible with TeamCity 5.0 EAP. The plugin is no longer compatible with TeamCity 4.5.x and below |
| August, 19, 2009 | Fixed bug that caused multiple NullPointerException's in TeamCity 5.0 builds |
| June, 19, 2009 | Added build.vcs.lastIncluded.revision reference property |
| April, 15, 2009 | added build.triggeredBy and build.triggeredBy.username reference properties |
| April, 11, 2009 | rename reference property system.build.start.date into build.start.date and system.build.start.time into build.start.time, add empty BuildServerListener |
| April, 2, 2009 | Added build.vcs.lastIncluded.revision properties to use in a build. |
| March, 31, 2009 | Initial checkin |