free, open source
This plugin allows to limit concurrently running builds from different build configurations based on defined "resources" and "locks".
Current version supports multiple read and write locks per build configuration.
Plugin Development Status
Install the plugin as usual.
Resource is a named entity that is defined per project. Build configurations can lock resources during execution of build steps. To create a resource, head to project configuration page. There choose 'SharedResources' tab. You can create resources of two types: simple named resources with quotas and resources with custom values.
- Quota is a maximum number of read locks that can be acquired on resource. Quota can be infinite.
- Custom value is a value that is passed to build that has acquired a lock on such resource. For example, it can represent and URL
Project groups support. (TC 8.0+)
Resources support project groups and subprojects. If you define a resource in a project that has subprojects, it will be available to all tree of subprojects
Information on resource usage is gathered across all subprojects
Locking quoted resources
There are two types of locks supported: read locks and write locks. Read locks are shared (multiple builds with read locks are allowed), write locks are exclusive (only a single running build with a write lock is allowed).
- To add a lock, head to a build stem in your build configuration, that requires locks.
- Add a build feature 'Shared Resources management'
- Use dialog to add necessary locks
Locking resources with custom values
Resources with custom values support three types of locks:
- Lock on any available value. In this case unless all values are used by running builds, the build that uses resource will start with one of available values. If all valued are used, the build will wait in queue.
- Lock on all values. In this case build will lock all values of the resource. No other builds that use this resource will be started until it is finished.
- Lock on specific value. In this case only specific value of the resource will be passed to the build. If it is taken by another build, the build will wait in queue until it becomes available.
Information in build queue
- To see locks in effect, head to build queue page. Screenshot below shows a build waiting fo lock
TeamCity Versions Compatibility
Sources on GitHub
Last build on public TeamCity server: