Child pages
  • TeamCity Shared Resources
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

General Info




Apache 2.0


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

In active development. Everybody is encouraged to try the plugin and provide feedback in the forum or post bugs into the issue tracker.


New installation

Install the plugin as usual under TeamCity 7.1.x. Plugin in bundled since TeamCity version 8.


Managing resources

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

Managing locks

Locking resources with quotas

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 step 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

TeamCity 7.1+


Stable builds of the plugin are bundled since TeamCity 8.0. Nightly builds and builds for TeamCity 7.1.x can be acquired from our public server

Sources on GitHub

Related Materials

Original issue

  • No labels