We are using AWS CodeBuild along with GitHub webhooks to trigger a build process. When a PR is created for a branch that starts with a Jira ticket prefix, i.e oscs-278
, we build a new environment with Terraform. When we make commits to the PR it triggers the build process to update that environment.
This flow works well for us, especially since as of February 2021, AWS CodeBuild allows you to set concurrent builds to 1. This is important for us as we should only ever have one deployment at one time, the rest should be queued.
However, our current build process takes up to 15 minutes, if we commit to the branch within this time frame, the project is not being queued if another build is in process.
Is this likely to be an issue with the GitHub webhooks, or something to do with AWS CodeBuild.
From the AWS docs:
The maximum number of builds in a queue is five times the concurrent build limit.
So in theory, I should have 5 in the queue (maximum)