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

Compare with Current View Page History

« Previous Version 3 Next »

Shared Resources are used in Continua CI to limit the number builds or stages from certain configurations which can run concurrently on the server or an agent. Each shared resource has an allocation of locks which can be acquired and held by Builds or Stages. This can be useful to limit the number of times a particular tool is run due to a license or memory limit, or to prevent concurrency issues with multiple build stages simultaneously writing to the same file, folder or network resource.

Shared Resource locks are allocated at agent or server level. Server Shared Resource locks can be acquired while evaluating configuration conditions and also while selecting an agent. Any builds which require Server Shared Resource locks which are held by other builds will wait on the build queue or stage queue until the required locks are released.

Agent Shared Resource locks are allocated per agent and can be acquired when an agent is selected for a stage. Continua CI will chose the agent with the highest available allocation of the required locks. If there are no Agent Shared Resource locks available for any available agent, the build will wait on the stage queue until the required locks are released.  

Shared Resource locks are automatically released at the end of the build or stage which acquired the lock.

 

Types of Shared Resource

Single: A single read or write lock. Only one build or stage can acquire a lock on this Shared Resource at any time. This is useful if build actions require exclusive access to a resource on a server or agent 

Infinite: Any number of read locks. A single write lock. Any number of builds or stages can acquire read locks on this Shared Resource. Only one build or stage can acquire a write lock on this Shared Resource at any time. A write lock can only be acquired if no read locks are held.

Quota: Fixed number of read locks. A single write lock. A specified number of builds or stages can acquire read locks on this Shared Resource. Only one build or stage can acquire a write lock on this Shared Resource at any time. A write lock can only be acquired if no read locks are held.

Quota List: Fixed number of read locks per label. A single write lock per label. A specified number of builds or stages can acquire read locks on each label defined on this Shared Resource. Only one build or stage can acquire a write lock on each label of this Shared Resource at any time. A write lock can only be acquired if no read locks are held on the specified label.

 

 

 

 

 

  • No labels