From 43d15bdbf8f6ad5736c697ddee0bbad113719e0e Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Tue, 31 Dec 2024 13:09:06 -0600 Subject: [PATCH] ci: Prevent concurrent builds The `disableConcurrentBuilds` pipeline option tells Jenkins to force subsequent builds _of the same job_ to wait in queue until the one running has completed. This is sufficient when there is only one branch/project in development at a time. In order to prevent multiple projects from running simultaneously, we need to acquire a global lock; all projects need to have this same option in order for it to be effective. --- ci/Jenkinsfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 1270b8c..3c782f3 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -8,6 +8,11 @@ pipeline { } } + options { + disableConcurrentBuilds() + lock 'aimee-os' + } + stages { stage('Prepare') { steps {