From ea88b0585ccc212d7ee6e3342da085526d62a98a Mon Sep 17 00:00:00 2001 From: Mohammed Ismail Date: Tue, 20 Apr 2021 10:54:11 +0200 Subject: [PATCH] CI: added resource lock Signed-off-by: Mohammed Ismail --- ci-scripts/Jenkinsfile-physim-deploy | 5 ++++- ci-scripts/cls_physim1.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy index 5eff0b34be..4014990f93 100644 --- a/ci-scripts/Jenkinsfile-physim-deploy +++ b/ci-scripts/Jenkinsfile-physim-deploy @@ -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 { diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index 44a8c1678f..9e8d3d0613 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -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()