Use generic lockResources in all pipelines

This commit is contained in:
Robert Schmidt
2022-09-29 10:46:45 +02:00
parent a1de5e3d11
commit cadaadf816
11 changed files with 82 additions and 86 deletions
+7 -4
View File
@@ -23,8 +23,10 @@
// Location of the python executor node shall be in the same subnet as the others servers
def nodeExecutor = params.nodeExecutor
// Name of the phone resource
def ciServerResource = params.serverResource
// Name of the resource
def lockResources = []
if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Docker Hub account to push to
def DH_Account = "oaisoftwarealliance"
@@ -36,7 +38,7 @@ pipeline {
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock (ciServerResource)
lock(extra: lockResources)
}
stages {
stage ("Verify Parameters") {
@@ -49,7 +51,8 @@ pipeline {
if (params.nodeExecutor != null) {
echo "Docker Push executor node : ${nodeExecutor}"
}
if (params.serverResource == null) {
if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false
}
}