From 69dfd020b03c3d420dcd3122bf50b7a63bb7cd31 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 28 Feb 2019 16:07:49 +0100 Subject: [PATCH] CI: even in sequential mode, all VM-based are run. Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 48 ++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index fc52238484..ff0030d3c4 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -272,7 +272,7 @@ pipeline { } } } catch (Exception e) { - echo "Red Hat build failed not an error now" + echo "Red Hat build failed but we could keep running pipeline if all ubuntu-based build passed" } } } @@ -317,9 +317,15 @@ pipeline { stages { stage ("Test physical simulators") { steps { - gitlabCommitStatus(name: "Test phy-sim") { - timeout (time: 20, unit: 'MINUTES') { - sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + script { + gitlabCommitStatus(name: "Test phy-sim") { + timeout (time: 20, unit: 'MINUTES') { + try { + sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } catch (Exception e) { + currentBuild.result = 'FAILURE' + } + } } } } @@ -329,25 +335,43 @@ pipeline { expression {doFlexranCtrlTest} } steps { - timeout (time: 20, unit: 'MINUTES') { - sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant flexran-rtc --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + script { + timeout (time: 20, unit: 'MINUTES') { + try { + sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant flexran-rtc --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + } catch (Exception e) { + currentBuild.result = 'FAILURE' + } + } } } } stage ("Test basic simulator") { steps { - gitlabCommitStatus(name: "Test basic-sim") { - timeout (time: 30, unit: 'MINUTES') { - sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + script { + gitlabCommitStatus(name: "Test basic-sim") { + timeout (time: 30, unit: 'MINUTES') { + try { + sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } catch (Exception e) { + currentBuild.result = 'FAILURE' + } + } } } } } stage ("Test L2 simulator") { steps { - gitlabCommitStatus(name: "Test L2-sim") { - timeout (time: 30, unit: 'MINUTES') { - sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + script { + gitlabCommitStatus(name: "Test L2-sim") { + timeout (time: 30, unit: 'MINUTES') { + try { + sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } catch (Exception e) { + currentBuild.result = 'FAILURE' + } + } } } }