CI: Introducing parallel builds on Virtual Machines
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -8,8 +8,7 @@ pipeline {
|
||||
disableConcurrentBuilds()
|
||||
timestamps()
|
||||
gitLabConnection('OAI GitLab')
|
||||
//gitlabBuilds(builds: ["Build", "Test"])
|
||||
gitlabBuilds(builds: ["Local Build"])
|
||||
gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim"])
|
||||
}
|
||||
|
||||
stages {
|
||||
@@ -22,6 +21,7 @@ pipeline {
|
||||
// GitLab-Jenkins plugin integration is lacking to perform the merge by itself
|
||||
// Doing it manually --> it may have merge conflicts
|
||||
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||
sh "zip -r localZip.zip ."
|
||||
|
||||
// Running astyle options on the list of modified files by the merge request
|
||||
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
|
||||
@@ -38,6 +38,7 @@ pipeline {
|
||||
echo "Git Branch is ${GIT_BRANCH}"
|
||||
echo "Git Commit is ${GIT_COMMIT}"
|
||||
|
||||
sh "zip -r localZip.zip ."
|
||||
// Running astyle options on all C/H files in the repository
|
||||
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
|
||||
sh "./ci-scripts/checkCodingFormattingRules.sh"
|
||||
@@ -45,17 +46,32 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Local Build") {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Local Build") {
|
||||
sh "./ci-scripts/buildLocally.sh --workspace $WORKSPACE"
|
||||
|
||||
stage ("Variant Builds") {
|
||||
parallel {
|
||||
stage ("Build eNb-USRP") {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build eNb-USRP") {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build basic simulator") {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build basic-sim") {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
if(fileExists('archives/local_build_logs.zip')) {
|
||||
archiveArtifacts artifacts: 'archives/local_build_logs.zip'
|
||||
dir ('archives') {
|
||||
sh "zip -r vm_build_logs.zip basic_sim enb_usrp"
|
||||
}
|
||||
if(fileExists('archives/vm_build_logs.zip')) {
|
||||
archiveArtifacts artifacts: 'archives/vm_build_logs.zip'
|
||||
}
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||
|
||||
Reference in New Issue
Block a user