Prevent parallel builds in the same repo

I have DRONE_MAX_PROCS=2, and I have parallel builds => this is good

But Drone also starts up two builds from the same repo, and since I’m caching npm and bundle with a volume, these builds often boggle up.

Ideally I’d like to have many parallel builds for the many different repos, but the in the same repo, builds should be run sequentially, one at a time.

Hoping I can achieve this behaviour somehow.


I presume you are using the volume cache or some other disk-backed plugin? The problem with these plugins is they are susceptible to race conditions since two builds can read and write the cache at the same time. The S3 (or minio) cache plugins would not be subject to these race conditions. Or you could create a custom cache plugin that uses some form of locking.

Thanks for the quick response. It looks like as if I can use those plugins to solve the issue. :+1: