Lock CI jobs per PR
As the Docker images now store Allure and log files in unique
directories, multiple CI jobs from the same repository can now run
simultaneously.
@@ -5,7 +5,6 @@ pipeline {
// building the Docker image.
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '5'))
- lock resource: 'VoightKampff'
}
stages {
// Run the build in the against the dev branch to check for compile errors
@@ -15,6 +14,9 @@ pipeline {
changeRequest target: 'dev'
}
}
+ options {
+ lock(resource: "lock_${env.JOB_NAME}")
+ }
environment {
//spawns GITHUB_USR and GITHUB_PSW environment variables
GITHUB=credentials('38b2e4a6-167a-40b2-be6f-d69be42c8190')
@@ -34,6 +36,9 @@ pipeline {
changeRequest target: 'dev'
}
}
+ options {
+ lock(resource: "lock_${env.JOB_NAME}")
+ }
environment {
// Some branches have a "/" in their name (e.g. feature/new-and-cool)
// Some commands, such as those tha deal with directories, don't
