From dfd5f316fcb83e95540c20234619b52ccfe34b68 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Date: Wed, 15 May 2019 15:58:59 +0200
Subject: [PATCH] CI: fix in path

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
---
 ci-scripts/Jenkinsfile-gitlab       | 4 ++++
 ci-scripts/Jenkinsfile-tmp-full-ran | 2 +-
 ci-scripts/Jenkinsfile-tmp-ran      | 2 +-
 ci-scripts/Jenkinsfile-tmp-ue       | 2 +-
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab
index 2d89e00174b..56624d32300 100644
--- a/ci-scripts/Jenkinsfile-gitlab
+++ b/ci-scripts/Jenkinsfile-gitlab
@@ -464,6 +464,7 @@ pipeline {
                 stage ("Test IF4p5 - FDD - Band 7 - B210") {
                     steps {
                         script {
+                            sh "sleep 60"
                             triggerSlaveJob ('eNB-CI-IF4p5-FDD-Band7-B210', 'Test-IF4p5-FDD-Band7')
                         }
                     }
@@ -483,6 +484,7 @@ pipeline {
                 stage ("Test IF4p5 - TDD - Band 40 - B210") {
                     steps {
                         script {
+                            sh "sleep 60"
                             triggerSlaveJob ('eNB-CI-IF4p5-TDD-Band40-B210', 'Test-IF4p5-TDD-Band40')
                         }
                     }
@@ -585,6 +587,8 @@ pipeline {
     post {
         always {
             script {
+                // Stage destroy may not be run if error in previous stage
+                sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
                 emailext attachmentsPattern: '*results*.html',
                      body: '''Hi,
 
diff --git a/ci-scripts/Jenkinsfile-tmp-full-ran b/ci-scripts/Jenkinsfile-tmp-full-ran
index 500e4ba6741..3e0777b6a72 100644
--- a/ci-scripts/Jenkinsfile-tmp-full-ran
+++ b/ci-scripts/Jenkinsfile-tmp-full-ran
@@ -187,7 +187,7 @@ pipeline {
                         } else {
                             String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
                             for (xmlFile in myXmlTestSuite) {
-                                if (fileExists("ci-scripts/" + xmlFile)) {
+                                if (fileExists(xmlFile)) {
                                     mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
                                     echo "Test XML file         :   ${xmlFile}"
                                 }
diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran
index c0a967c6276..5ffaefa89ff 100644
--- a/ci-scripts/Jenkinsfile-tmp-ran
+++ b/ci-scripts/Jenkinsfile-tmp-ran
@@ -206,7 +206,7 @@ pipeline {
                         } else {
                             String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
                             for (xmlFile in myXmlTestSuite) {
-                                if (fileExists("ci-scripts/" + xmlFile)) {
+                                if (fileExists(xmlFile)) {
                                     mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
                                     echo "Test XML file         :   ${xmlFile}"
                                 }
diff --git a/ci-scripts/Jenkinsfile-tmp-ue b/ci-scripts/Jenkinsfile-tmp-ue
index 0464c0374f0..c2db977bcb8 100644
--- a/ci-scripts/Jenkinsfile-tmp-ue
+++ b/ci-scripts/Jenkinsfile-tmp-ue
@@ -177,7 +177,7 @@ pipeline {
                         } else {
                             String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
                             for (xmlFile in myXmlTestSuite) {
-                                if (fileExists("ci-scripts/" + xmlFile)) {
+                                if (fileExists(xmlFile)) {
                                     mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
                                     echo "Test XML file         :   ${xmlFile}"
                                 }
-- 
GitLab