Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
How to prevent concurrent releases for a single application
-
We have multiple releases configured for an application. If one release is in progress, and a second release is triggered, the second release will run and possibly interfere with the first release.
Is there a way to prevent this, so only one release can run at a time for a single application?
Product: BuildMaster
Version: 5.5.1
-
Are you referring to Legacy Release Package URL Triggers? If so, there is an option to let you select the latest release instead of all releases.
The new Release & Package Deployment will give you much more control, so we suggest to transition to that when possible.
-
We don't use URL triggers. This behavior occurs when the jobs are run manually (by clicking "Create Package"). It also occurs when we use Schedule Triggers.
-
I see, so you mean, deployment executions? In other words, you don't want two deployment executions (regardless of release) running on the same application?
Generally speaking, this is safe to do; it's just certain parts of the deployment plan will have problems. For this situation, you can use a
lock
execution directive (with a global specifier). This ensures only that block is run at a time.For example...
with lock=!sharedrive { ... operations that access a share drive exclusively go here ... }
-
In 4.9, BuildMaster handled this automatically and queued up any executions if there was one already running for an application. Was this behavior deprecated in 5.x?
-
Yes; that behavior was added in v3 because there were a lot of execution collisions (the default working directory used the ApplicationId). This was undesired by nearly all users.
The v5 engine uses ExecutionId for the default working directory,, and any collisions outside of working directories should be resolvable with a global lock.