Recently I ran into a few circular dependency problems when creating resources with AWS CloudFormation. While creating the stack AWS will throw a “Circular dependency between resources: [ ResourceA, Resource B, …]”. The error message is not very specific on where exactly this happened. The message can even set you on the wrong track while solving the problem.
In this article we will see how to implement a DevOps pipeline with Jenkins that can handle concurrent builds. Some stages of a pipeline require resources that can only be used by one build at a time. For example we might have a single test or staging environment. Instead of limiting the number of concurrent builds of our pipeline we will marshal the access to resources with the “lock” functionality.