CI: added resource lock

Signed-off-by: Mohammed Ismail <mohammed.ismail@openairinterface.org>
This commit is contained in:
Mohammed Ismail
2021-04-20 11:08:22 +02:00
parent 74d7bcb442
commit ea88b0585c
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -31,6 +31,9 @@ def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
// Name of the resource
def ciEpcResource = params.epcResource
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
def eNB_Repository
@@ -53,7 +56,7 @@ pipeline {
disableConcurrentBuilds()
timestamps()
ansiColor('xterm')
//lock(cn_ci_resource)
lock(ciEpcResource)
}
stages {
+1 -1
View File
@@ -162,7 +162,7 @@ class PhySim:
else:
logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocWorkspace}\u001B[0m')
mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag}', '\$', 6)
mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag} --tls-verify=false', '\$', 6)
mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag} --tls-verify=false', '\$', 30)
if mySSH.getBefore().count('Storing signatures') == 0:
logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m')
mySSH.close()