From a9cf09ec1c0228916770f30da9605d14d3312d63 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 29 Aug 2018 10:16:54 +0200 Subject: [PATCH] CI: fixing merge issues. First on the build side. Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 136 +--------------------------------- ci-scripts/buildOnVM.sh | 1 - 2 files changed, 2 insertions(+), 135 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index fe1fe157b3..d1b42136f9 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -32,7 +32,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { def doRedHatBuild = false def FDD_Band7_B210_Status ->>>>>>> origin/develop pipeline { agent { @@ -42,7 +41,7 @@ pipeline { disableConcurrentBuilds() timestamps() gitLabConnection('OAI GitLab') - gitlabBuilds(builds: ["Build eNb-USRP", "Build gNb-usrp", "Build nr-UE-usrp", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test-FDD-Band7"]) + gitlabBuilds(builds: ["Build eNb-USRP", "Build gNb-usrp", "Build nr-UE-usrp", "Build phy-sim", "Analysis with cppcheck"]) ansiColor('xterm') } @@ -126,12 +125,6 @@ pipeline { } } - stage ("Start VM -- basic-sim") { - steps { - sh "./ci-scripts/createVM.sh --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } - } - stage ("Start VM -- phy-sim") { steps { sh "./ci-scripts/createVM.sh --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" @@ -147,18 +140,6 @@ pipeline { stage ("Start VM -- nu-ue-usrp") { steps { sh "./ci-scripts/createVM.sh --variant nu-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } - } - - stage ("Start VM -- enb-ethernet") { - steps { - sh "./ci-scripts/createVM.sh --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } - } - - stage ("Start VM -- ue-ethernet") { - steps { - sh "./ci-scripts/createVM.sh --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}" } } @@ -196,34 +177,6 @@ pipeline { steps { gitlabCommitStatus(name: "Build phy-sim") { sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" - } - } - } - stage ("Build basic simulator") { - steps { - gitlabCommitStatus(name: "Build basic-sim") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" - } - } - } - stage ("Build physical simulators") { - steps { - gitlabCommitStatus(name: "Build phy-sim") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" - } - } - } - stage ("Build eNb-ethernet") { - steps { - gitlabCommitStatus(name: "Build eNb-ethernet") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" - } - } - } - stage ("Build UE-ethernet") { - steps { - gitlabCommitStatus(name: "Build UE-ethernet") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" } } } @@ -252,7 +205,7 @@ pipeline { always { script { dir ('archives') { - sh "zip -r -qq vm_build_logs.zip basic_sim enb_usrp phy_sim cppcheck gnb_usrp nrue_usrp enb_eth ue_eth red_hat" + sh "zip -r -qq vm_build_logs.zip enb_usrp phy_sim cppcheck gnb_usrp nrue_usrp red_hat" } if(fileExists('archives/vm_build_logs.zip')) { archiveArtifacts artifacts: 'archives/vm_build_logs.zip' @@ -279,91 +232,6 @@ pipeline { } } - stage ("Variant Tests") { - parallel { - stage ("Test physical simulators") { - steps { - gitlabCommitStatus(name: "Test phy-sim") { - sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" - } - } - } - stage ("Test basic simulator") { - steps { - //gitlabCommitStatus(name: "Test basic-sim") { - sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" - //} - } - } - stage ("Test FDD - Band 7 - B210") { - steps { - gitlabCommitStatus(name: "Test-FDD-Band7") { - script { - if ("MERGE".equals(env.gitlabActionType)) { - FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', - parameters: [ - string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), - string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), - string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), - booleanParam(name: 'eNB_mergeRequest', value: true) - ] - } else { - FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', - parameters: [ - string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), - string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), - string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), - booleanParam(name: 'eNB_mergeRequest', value: false) - ] - } - } - } - } - post { - // In case of success we really pick the report from the exact slave build number - success { - script { - copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210', - filter: 'test_results*.html', - selector: specific("${FDD_Band7_B210_Status.number}")) - if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { - archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html' - } - } - } - // In case of any non-success, we are retrieving the HTML report of the last completed - // slave job. Note that we could use that syntax also in case of success. - // The only drop-back is that we may retrieve the HTML report of a previous build - cleanup { - script { - if (!fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { - copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210', - filter: 'test_results*.html', - selector: lastCompleted()) - if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { - archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html' - } - } - } - } - } - } - } - post { - always { - script { - dir ('archives') { - sh "if [ -d */test ]; then zip -r -qq vm_tests_logs.zip */test ; fi" - } - if(fileExists('archives/vm_tests_logs.zip')) { - archiveArtifacts artifacts: 'archives/vm_tests_logs.zip' - archiveArtifacts artifacts: 'archives/*/test/results_autotests*.xml' - archiveArtifacts artifacts: 'archives/*/test/*.xsl' - } - } - } - } - } stage ("Destroy all Virtual Machines") { steps { sh "./ci-scripts/destroyAllRunningVM.sh --job-name ${JOB_NAME} --build-id ${BUILD_ID}" diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh index 091e1f5183..2d4e6f97d7 100755 --- a/ci-scripts/buildOnVM.sh +++ b/ci-scripts/buildOnVM.sh @@ -156,7 +156,6 @@ case $key in LOG_PATTERN=cppcheck.xml NB_PATTERN_FILES=1 BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 -i openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c" - shift ;; -v5)