Use generic lockResources in all pipelines
This commit is contained in:
@@ -33,8 +33,9 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
|
||||
// Location of the executor node
|
||||
def nodeExecutor = params.nodeExecutor
|
||||
|
||||
// VM Lockable resources
|
||||
def vmResource = params.vmLockableResource
|
||||
def lockResources = []
|
||||
if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
|
||||
|
||||
// Tags to shorten pipeline duration
|
||||
def doMandatoryTests = false
|
||||
@@ -138,7 +139,7 @@ pipeline {
|
||||
|
||||
stage ("Start VM -- gnb-usrp") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
lock (extra: lockResources) {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
@@ -148,7 +149,7 @@ pipeline {
|
||||
|
||||
stage ("Start VM -- nr-ue-usrp") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
lock (extra: lockResources) {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
@@ -158,7 +159,7 @@ pipeline {
|
||||
|
||||
stage ("Start VM -- enb-ethernet") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
lock (extra: lockResources) {
|
||||
timeout (time: 7, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
@@ -168,7 +169,7 @@ pipeline {
|
||||
|
||||
stage ("Start VM -- ue-ethernet") {
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
lock (extra: lockResources) {
|
||||
timeout (time: 7, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
@@ -208,7 +209,7 @@ pipeline {
|
||||
stage ("Build UE-ethernet") {
|
||||
steps {
|
||||
// This is typically the last one to finish.
|
||||
lock (vmResource) {
|
||||
lock (extra: lockResources) {
|
||||
gitlabCommitStatus(name: "Build UE-ethernet") {
|
||||
timeout (time: 45, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
@@ -269,7 +270,7 @@ pipeline {
|
||||
expression {doMandatoryTests}
|
||||
}
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
lock (extra: lockResources) {
|
||||
script {
|
||||
timeout (time: 30, unit: 'MINUTES') {
|
||||
try {
|
||||
@@ -289,7 +290,7 @@ pipeline {
|
||||
expression {doMandatoryTests}
|
||||
}
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
lock (extra: lockResources) {
|
||||
script {
|
||||
timeout (time: 40, unit: 'MINUTES') {
|
||||
try {
|
||||
@@ -309,7 +310,7 @@ pipeline {
|
||||
expression {doMandatoryTests}
|
||||
}
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
lock (extra: lockResources) {
|
||||
script {
|
||||
timeout (time: 40, unit: 'MINUTES') {
|
||||
try {
|
||||
@@ -329,7 +330,7 @@ pipeline {
|
||||
expression {doMandatoryTests}
|
||||
}
|
||||
steps {
|
||||
lock (vmResource) {
|
||||
lock (extra: lockResources) {
|
||||
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user