Commit 97ecde7b authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/ci-improvements-sep' into integration_2022_wk40

parents 02d69da1 52af6bc2
...@@ -24,8 +24,9 @@ ...@@ -24,8 +24,9 @@
def nodeExecutor = params.nodeExecutor def nodeExecutor = params.nodeExecutor
// Tags to shorten pipeline duration // Tags to shorten pipeline duration
def doMandatoryTests = false def doBuild = true
def doFullTestsuite = false def do4Gtest = false
def do5Gtest = false
// //
def gitCommitAuthorEmailAddr def gitCommitAuthorEmailAddr
...@@ -56,26 +57,30 @@ pipeline { ...@@ -56,26 +57,30 @@ pipeline {
LABEL_CHECK = sh returnStdout: true, script: 'ci-scripts/checkGitLabMergeRequestLabels.sh --mr-id ' + env.gitlabMergeRequestIid LABEL_CHECK = sh returnStdout: true, script: 'ci-scripts/checkGitLabMergeRequestLabels.sh --mr-id ' + env.gitlabMergeRequestIid
LABEL_CHECK = LABEL_CHECK.trim() LABEL_CHECK = LABEL_CHECK.trim()
if (LABEL_CHECK == 'NONE') { if (LABEL_CHECK == 'NONE') {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Your merge request has none of the mandatory labels:\n\n" def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Your merge request should have one of the mandatory labels:\n\n"
message += " - BUILD-ONLY\n" message += " - ~documentation (don't perform any stages)\n"
message += " - 4G-LTE\n" message += " - ~BUILD-ONLY (execute only build stages)\n"
message += " - 5G-NR\n" message += " - ~4G-LTE (perform 4G tests)\n"
message += " - CI\n\n" message += " - ~5G-NR (perform 5G tests)\n"
message += " - ~CI (perform both 4G and 5G tests)\n\n"
message += "Not performing CI due to lack of labels" message += "Not performing CI due to lack of labels"
addGitLabMRComment comment: message addGitLabMRComment comment: message
error('Not performing CI due to lack of labels') error('Not performing CI due to lack of labels')
} else if (LABEL_CHECK == 'FULL') { } else if (LABEL_CHECK == 'FULL') {
doMandatoryTests = true do4Gtest = true
doFullTestsuite = true do5Gtest = true
} else if (LABEL_CHECK == "SHORTEN-4G") {
do4Gtest = true
} else if (LABEL_CHECK == 'SHORTEN-5G') { } else if (LABEL_CHECK == 'SHORTEN-5G') {
doMandatoryTests = true do5Gtest = true
} else if (LABEL_CHECK == 'documentation') {
doBuild = false
} else { } else {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): We will perform only build stages on your Merge Request" // is "BUILD-ONLY", will only build
addGitLabMRComment comment: message
} }
} else { } else {
doMandatoryTests = true do4Gtest = true
doFullTestsuite = true do5Gtest = true
} }
} }
} }
...@@ -116,11 +121,12 @@ pipeline { ...@@ -116,11 +121,12 @@ pipeline {
// Build Stages are Mandatory // Build Stages are Mandatory
// Later we will add a Ubuntu20 build // Later we will add a Ubuntu20 build
stage ("Image Building Processes") { stage ("Image Building Processes") {
when { expression {doBuild} }
parallel { parallel {
stage ("Ubuntu18 Build") { stage ("Ubuntu18-Image-Builder") {
steps { steps {
script { script {
triggerSlaveJob ('RAN-Ubuntu18-Image-Builder', 'Ubuntu18-Images-Build') triggerSlaveJob ('RAN-Ubuntu18-Image-Builder', 'Ubuntu18-Image-Builder')
} }
} }
post { post {
...@@ -155,10 +161,10 @@ pipeline { ...@@ -155,10 +161,10 @@ pipeline {
} }
} }
} }
stage ("CppCheck Analysis") { stage ("cppcheck") {
steps { steps {
script { script {
triggerSlaveJob ('RAN-cppcheck', 'CppCheck Analysis') triggerSlaveJob ('RAN-cppcheck', 'cppcheck')
} }
} }
post { post {
...@@ -177,12 +183,13 @@ pipeline { ...@@ -177,12 +183,13 @@ pipeline {
} }
} }
stage ("Image Test Processes") { stage ("Image Test Processes") {
when { expression {doBuild} }
parallel { parallel {
stage ("Physical Simulators") { stage ("PhySim-Cluster") {
when { expression {doMandatoryTests} } when { expression {do4Gtest || do5Gtest} }
steps { steps {
script { script {
triggerSlaveJob ('RAN-PhySim-Cluster', 'Test-Physim-Cluster') triggerSlaveJob ('RAN-PhySim-Cluster', 'PhySim-Cluster')
} }
} }
post { post {
...@@ -198,11 +205,11 @@ pipeline { ...@@ -198,11 +205,11 @@ pipeline {
} }
} }
} }
stage ("4G RF Simulators") { stage ("RF-Sim-Test-4G") {
when { expression {doMandatoryTests} } when { expression {do4Gtest} }
steps { steps {
script { script {
triggerSlaveJob ('RAN-RF-Sim-Test-4G', 'Test-RF-Sim-Container-4G') triggerSlaveJob ('RAN-RF-Sim-Test-4G', 'RF-Sim-Test-4G')
} }
} }
post { post {
...@@ -218,11 +225,11 @@ pipeline { ...@@ -218,11 +225,11 @@ pipeline {
} }
} }
} }
stage ("5G RF Simulators") { stage ("RF-Sim-Test-5G") {
when { expression {doMandatoryTests} } when { expression {do5Gtest} }
steps { steps {
script { script {
triggerSlaveJob ('RAN-RF-Sim-Test-5G', 'Test-RF-Sim-Container-5G') triggerSlaveJob ('RAN-RF-Sim-Test-5G', 'RF-Sim-Test-5G')
} }
} }
post { post {
...@@ -238,11 +245,11 @@ pipeline { ...@@ -238,11 +245,11 @@ pipeline {
} }
} }
} }
stage ("4G L2 Simulators") { stage ("L2-Sim-Test-4G") {
when { expression {doMandatoryTests} } when { expression {do4Gtest} }
steps { steps {
script { script {
triggerSlaveJob ('RAN-L2-Sim-Test-4G', 'Test-L2-Sim-Container-4G') triggerSlaveJob ('RAN-L2-Sim-Test-4G', 'L2-Sim-Test-4G')
} }
} }
post { post {
...@@ -258,11 +265,11 @@ pipeline { ...@@ -258,11 +265,11 @@ pipeline {
} }
} }
} }
stage ("5G L2 Simulators") { stage ("L2-Sim-Test-5G") {
when { expression {doMandatoryTests} } when { expression {do5Gtest} }
steps { steps {
script { script {
triggerSlaveJob ('RAN-L2-Sim-Test-5G', 'Test-L2-Sim-Container-5G') triggerSlaveJob ('RAN-L2-Sim-Test-5G', 'L2-Sim-Test-5G')
} }
} }
post { post {
...@@ -278,11 +285,11 @@ pipeline { ...@@ -278,11 +285,11 @@ pipeline {
} }
} }
} }
stage ("NSA B200 Sanity Check") { stage ("NSA-B200-Module-LTEBOX-Container") {
when { expression {doMandatoryTests} } when { expression {do4Gtest || do5Gtest} }
steps { steps {
script { script {
triggerSlaveJob ('RAN-NSA-B200-Module-LTEBOX-Container', 'Test-NSA-B200') triggerSlaveJob ('RAN-NSA-B200-Module-LTEBOX-Container', 'NSA-B200-Module-LTEBOX-Container')
} }
} }
post { post {
...@@ -298,11 +305,11 @@ pipeline { ...@@ -298,11 +305,11 @@ pipeline {
} }
} }
} }
stage ("SA B200 Sanity Check") { stage ("SA-B200-Module-SABOX-Container") {
when { expression {doMandatoryTests} } when { expression {do5Gtest} }
steps { steps {
script { script {
triggerSlaveJob ('RAN-SA-B200-Module-SABOX-Container', 'Test-SA-B200') triggerSlaveJob ('RAN-SA-B200-Module-SABOX-Container', 'SA-B200-Module-SABOX-Container')
} }
} }
post { post {
...@@ -318,17 +325,17 @@ pipeline { ...@@ -318,17 +325,17 @@ pipeline {
} }
} }
} }
stage ("Test OAI NR UE - OAI gNB - TDD - Band 78 - N300") { stage ("gNB-N300-Timing-Phytest-LDPC") {
when { expression {doMandatoryTests} } when { expression {do5Gtest} }
steps { steps {
script { script {
triggerSlaveJob ('RAN-gNB-nrUE-MONO-TDD-Band78-N300', 'Test-TDD-Band78-gNB-NR-UE') triggerSlaveJob ('RAN-gNB-N300-Timing-Phytest-LDPC', 'gNB-N300-Timing-Phytest-LDPC')
} }
} }
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-gNB-nrUE-MONO-TDD-Band78-N300') finalizeSlaveJob('RAN-gNB-N300-Timing-Phytest-LDPC')
} }
} }
failure { failure {
...@@ -339,11 +346,11 @@ pipeline { ...@@ -339,11 +346,11 @@ pipeline {
} }
} }
//avra is offline, re-enable once it is available //avra is offline, re-enable once it is available
//stage ("Test T1 Offload") { //stage ("T1-Offload-Test") {
// when { expression {doMandatoryTests} } // when { expression {do5Gtest} }
// steps { // steps {
// script { // script {
// triggerSlaveJob ('RAN-T1-Offload-Test', 'Test-T1-Offload') // triggerSlaveJob ('RAN-T1-Offload-Test', 'T1-Offload-Test')
// } // }
// } // }
// post { // post {
...@@ -361,11 +368,11 @@ pipeline { ...@@ -361,11 +368,11 @@ pipeline {
//} //}
} }
} }
stage ("Images Push to Registries") { stage ("DockerHub-Push") {
when { expression {"PUSH".equals(env.gitlabActionType)} } when { expression {doBuild && "PUSH".equals(env.gitlabActionType)} }
steps { steps {
script { script {
triggerSlaveJob ('RAN-DockerHub-Push', 'Push-to-Docker-Hub') triggerSlaveJob ('RAN-DockerHub-Push', 'DockerHub-Push')
} }
} }
post { post {
...@@ -401,7 +408,6 @@ pipeline { ...@@ -401,7 +408,6 @@ pipeline {
script { script {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): passed (" + BUILD_URL + ")" def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): passed (" + BUILD_URL + ")"
if ("MERGE".equals(env.gitlabActionType)) { if ("MERGE".equals(env.gitlabActionType)) {
echo "This is a MERGE event"
addGitLabMRComment comment: message addGitLabMRComment comment: message
} }
echo "Pipeline is SUCCESSFUL" echo "Pipeline is SUCCESSFUL"
...@@ -411,7 +417,6 @@ pipeline { ...@@ -411,7 +417,6 @@ pipeline {
script { script {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): failed (" + BUILD_URL + ")" def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): failed (" + BUILD_URL + ")"
if ("MERGE".equals(env.gitlabActionType)) { if ("MERGE".equals(env.gitlabActionType)) {
echo "This is a MERGE event"
addGitLabMRComment comment: message addGitLabMRComment comment: message
} }
echo "Pipeline FAILED" echo "Pipeline FAILED"
......
...@@ -33,8 +33,9 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { ...@@ -33,8 +33,9 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
// Location of the executor node // Location of the executor node
def nodeExecutor = params.nodeExecutor def nodeExecutor = params.nodeExecutor
// VM Lockable resources def lockResources = []
def vmResource = params.vmLockableResource if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Tags to shorten pipeline duration // Tags to shorten pipeline duration
def doMandatoryTests = false def doMandatoryTests = false
...@@ -81,7 +82,7 @@ pipeline { ...@@ -81,7 +82,7 @@ pipeline {
message += "Not performing CI due to lack of labels" message += "Not performing CI due to lack of labels"
addGitLabMRComment comment: message addGitLabMRComment comment: message
error('Not performing CI due to lack of labels') error('Not performing CI due to lack of labels')
} else if (LABEL_CHECK == 'FULL') { } else if (LABEL_CHECK == 'FULL' || LABEL_CHECK == 'SHORTEN-4G') {
doMandatoryTests = true doMandatoryTests = true
doFullTestsuite = true doFullTestsuite = true
} else if (LABEL_CHECK == 'SHORTEN-5G') { } else if (LABEL_CHECK == 'SHORTEN-5G') {
...@@ -138,7 +139,7 @@ pipeline { ...@@ -138,7 +139,7 @@ pipeline {
stage ("Start VM -- gnb-usrp") { stage ("Start VM -- gnb-usrp") {
steps { steps {
lock (vmResource) { lock (extra: lockResources) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
...@@ -148,7 +149,7 @@ pipeline { ...@@ -148,7 +149,7 @@ pipeline {
stage ("Start VM -- nr-ue-usrp") { stage ("Start VM -- nr-ue-usrp") {
steps { steps {
lock (vmResource) { lock (extra: lockResources) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
...@@ -158,7 +159,7 @@ pipeline { ...@@ -158,7 +159,7 @@ pipeline {
stage ("Start VM -- enb-ethernet") { stage ("Start VM -- enb-ethernet") {
steps { steps {
lock (vmResource) { lock (extra: lockResources) {
timeout (time: 7, unit: 'MINUTES') { timeout (time: 7, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
...@@ -168,7 +169,7 @@ pipeline { ...@@ -168,7 +169,7 @@ pipeline {
stage ("Start VM -- ue-ethernet") { stage ("Start VM -- ue-ethernet") {
steps { steps {
lock (vmResource) { lock (extra: lockResources) {
timeout (time: 7, unit: 'MINUTES') { timeout (time: 7, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
...@@ -208,7 +209,7 @@ pipeline { ...@@ -208,7 +209,7 @@ pipeline {
stage ("Build UE-ethernet") { stage ("Build UE-ethernet") {
steps { steps {
// This is typically the last one to finish. // This is typically the last one to finish.
lock (vmResource) { lock (extra: lockResources) {
gitlabCommitStatus(name: "Build UE-ethernet") { gitlabCommitStatus(name: "Build UE-ethernet") {
timeout (time: 45, unit: 'MINUTES') { timeout (time: 45, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
...@@ -269,7 +270,7 @@ pipeline { ...@@ -269,7 +270,7 @@ pipeline {
expression {doMandatoryTests} expression {doMandatoryTests}
} }
steps { steps {
lock (vmResource) { lock (extra: lockResources) {
script { script {
timeout (time: 30, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
try { try {
...@@ -289,7 +290,7 @@ pipeline { ...@@ -289,7 +290,7 @@ pipeline {
expression {doMandatoryTests} expression {doMandatoryTests}
} }
steps { steps {
lock (vmResource) { lock (extra: lockResources) {
script { script {
timeout (time: 40, unit: 'MINUTES') { timeout (time: 40, unit: 'MINUTES') {
try { try {
...@@ -309,7 +310,7 @@ pipeline { ...@@ -309,7 +310,7 @@ pipeline {
expression {doMandatoryTests} expression {doMandatoryTests}
} }
steps { steps {
lock (vmResource) { lock (extra: lockResources) {
script { script {
timeout (time: 40, unit: 'MINUTES') { timeout (time: 40, unit: 'MINUTES') {
try { try {
...@@ -329,7 +330,7 @@ pipeline { ...@@ -329,7 +330,7 @@ pipeline {
expression {doMandatoryTests} expression {doMandatoryTests}
} }
steps { steps {
lock (vmResource) { lock (extra: lockResources) {
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
} }
} }
......
This diff is collapsed.
...@@ -32,7 +32,9 @@ def buildStageStatus = true ...@@ -32,7 +32,9 @@ def buildStageStatus = true
def testStageName = params.pipelineTestStageName def testStageName = params.pipelineTestStageName
// Name of the resource // Name of the resource
def ciEpcResource = params.epcResource def lockResources = []
if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Global Parameters. Normally they should be populated when the master job // Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters // triggers the slave job with parameters
...@@ -56,7 +58,7 @@ pipeline { ...@@ -56,7 +58,7 @@ pipeline {
disableConcurrentBuilds() disableConcurrentBuilds()
timestamps() timestamps()
ansiColor('xterm') ansiColor('xterm')
lock(ciEpcResource) lock(lockResources)
} }
stages { stages {
...@@ -80,7 +82,8 @@ pipeline { ...@@ -80,7 +82,8 @@ pipeline {
testStageName = 'Template Test Stage' testStageName = 'Template Test Stage'
} }
if (params.smartphonesResource == null) { if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false allParametersPresent = false
} }
if (params.eNB_IPAddress == null) { if (params.eNB_IPAddress == null) {
......
This diff is collapsed.
...@@ -23,8 +23,10 @@ ...@@ -23,8 +23,10 @@
// Location of the python executor node shall be in the same subnet as the others servers // Location of the python executor node shall be in the same subnet as the others servers
def nodeExecutor = params.nodeExecutor def nodeExecutor = params.nodeExecutor
// Name of the phone resource // Name of the resource
def ciServerResource = params.serverResource def lockResources = []
if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Docker Hub account to push to // Docker Hub account to push to
def DH_Account = "oaisoftwarealliance" def DH_Account = "oaisoftwarealliance"
...@@ -36,7 +38,7 @@ pipeline { ...@@ -36,7 +38,7 @@ pipeline {
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
ansiColor('xterm') ansiColor('xterm')
lock (ciServerResource) lock(extra: lockResources)
} }
stages { stages {
stage ("Verify Parameters") { stage ("Verify Parameters") {
...@@ -49,7 +51,8 @@ pipeline { ...@@ -49,7 +51,8 @@ pipeline {
if (params.nodeExecutor != null) { if (params.nodeExecutor != null) {
echo "Docker Push executor node : ${nodeExecutor}" echo "Docker Push executor node : ${nodeExecutor}"
} }
if (params.serverResource == null) { if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false allParametersPresent = false
} }
} }
......
...@@ -33,11 +33,9 @@ def buildStageStatus = true ...@@ -33,11 +33,9 @@ def buildStageStatus = true
// Name of the test stage // Name of the test stage
def testStageName = params.pipelineTestStageName def testStageName = params.pipelineTestStageName
// Name of the phone resource def lockResources = []
def ciSmartPhoneResource = params.smartphonesResource if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Name of the phone resource
def oaiUEResource = params.oaiUEResource
// Terminate Status // Terminate Status
def termENB = 0 def termENB = 0
...@@ -65,7 +63,7 @@ pipeline { ...@@ -65,7 +63,7 @@ pipeline {
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
ansiColor('xterm') ansiColor('xterm')
lock(extra: [[resource: oaiUEResource]], resource: ciSmartPhoneResource) lock(extra: lockResources)
} }
stages { stages {
...@@ -85,11 +83,9 @@ pipeline { ...@@ -85,11 +83,9 @@ pipeline {
testStageName = 'Template Test Stage' testStageName = 'Template Test Stage'
} }
if (params.smartphonesResource == null) { if (params.LockResources == null) {
allParametersPresent = false echo "no LockResources given"
} allParametersPresent = false
if (params.oaiUEResource == null) {
allParametersPresent = false
} }
if (params.eNB_IPAddress == null) { if (params.eNB_IPAddress == null) {
allParametersPresent = false allParametersPresent = false
......
...@@ -33,11 +33,9 @@ def buildStageStatus = true ...@@ -33,11 +33,9 @@ def buildStageStatus = true
// Name of the test stage // Name of the test stage
def testStageName = params.pipelineTestStageName def testStageName = params.pipelineTestStageName
// Name of the phone resource def lockResources = []
def ciSmartPhoneResource = params.smartphonesResource if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Name of the phone resource
def ciEpcResource = params.epcResource
// Global Parameters. Normally they should be populated when the master job // Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters // triggers the slave job with parameters
...@@ -54,7 +52,7 @@ pipeline { ...@@ -54,7 +52,7 @@ pipeline {
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
ansiColor('xterm') ansiColor('xterm')
lock(extra: [[resource: ciEpcResource]], resource: ciSmartPhoneResource) lock(extra: lockResources)
} }
stages { stages {
stage ("Verify Parameters") { stage ("Verify Parameters") {
...@@ -73,8 +71,9 @@ pipeline { ...@@ -73,8 +71,9 @@ pipeline {
testStageName = 'Template Test Stage' testStageName = 'Template Test Stage'
} }
if (params.smartphonesResource == null) { if (params.LockResources == null) {
allParametersPresent = false echo "no LockResources given"
allParametersPresent = false
} }
// 1st eNB parameters // 1st eNB parameters
if (params.eNB_IPAddress == null) { if (params.eNB_IPAddress == null) {
......
This diff is collapsed.
This diff is collapsed.
...@@ -34,10 +34,9 @@ def buildStageStatus = true ...@@ -34,10 +34,9 @@ def buildStageStatus = true
// Name of the test stage // Name of the test stage
def testStageName = params.pipelineTestStageName def testStageName = params.pipelineTestStageName
// Name of the phone/server resource def lockResources = []
def ciSmartPhonesResource1 = params.SmartPhonesResource1 if (params.LockResources != null && params.LockResources.trim().length() > 0)
def ciSmartPhonesResource2 = params.SmartPhonesResource2 params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
def ciSmartPhonesResource3 = params.SmartPhonesResource3
// Global Parameters. Normally they should be populated when the master job // Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters // triggers the slave job with parameters
...@@ -56,7 +55,7 @@ pipeline { ...@@ -56,7 +55,7 @@ pipeline {
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
ansiColor('xterm') ansiColor('xterm')
lock(extra: [[resource: ciSmartPhonesResource2],[resource: ciSmartPhonesResource1]],resource: ciSmartPhonesResource3) lock(extra: lockResources)
} }
stages { stages {
stage("Build Init") { stage("Build Init") {
...@@ -82,15 +81,10 @@ pipeline { ...@@ -82,15 +81,10 @@ pipeline {
testStageName = 'Template Test Stage' testStageName = 'Template Test Stage'
} }
if (params.SmartPhonesResource1 == null) { if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false allParametersPresent = false
} }
if (params.SmartPhonesResource2 == null) {
allParametersPresent = false
}
if (params.SmartPhonesResource3 == null) {
allParametersPresent = false
}
// 1st eNB parameters // 1st eNB parameters
if (params.eNB_IPAddress == null) { if (params.eNB_IPAddress == null) {
allParametersPresent = false allParametersPresent = false
......
...@@ -33,11 +33,9 @@ def buildStageStatus = true ...@@ -33,11 +33,9 @@ def buildStageStatus = true
// Name of the test stage // Name of the test stage
def testStageName = params.pipelineTestStageName def testStageName = params.pipelineTestStageName
// Name of the phone resource def lockResources = []
def ciSmartPhoneResource = params.smartphonesResource if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Name of the phone resource
def ciEpcResource = params.epcResource
// Terminate Status // Terminate Status
def termUE = 0 def termUE = 0
...@@ -67,7 +65,7 @@ pipeline { ...@@ -67,7 +65,7 @@ pipeline {
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
ansiColor('xterm') ansiColor('xterm')
lock(extra: [[resource: ciEpcResource]], resource: ciSmartPhoneResource) lock(extra: lockResources)
} }
// the following parameter options are commented out so it shows the ones // the following parameter options are commented out so it shows the ones
// that you SHALL have to run the job. // that you SHALL have to run the job.
...@@ -79,7 +77,7 @@ pipeline { ...@@ -79,7 +77,7 @@ pipeline {
string(name: 'pythonTestXmlFile', defaultValue: 'enb_usrpB210_band7_50PRB.xml', description: 'Location of the Test XML to be run') string(name: 'pythonTestXmlFile', defaultValue: 'enb_usrpB210_band7_50PRB.xml', description: 'Location of the Test XML to be run')
string(name: 'pipelineTestStageName', defaultValue: 'Test COTS-UE - OAI eNB - LTEBOX EPC', description: 'Naming of the Test Stage') string(name: 'pipelineTestStageName', defaultValue: 'Test COTS-UE - OAI eNB - LTEBOX EPC', description: 'Naming of the Test Stage')
booleanParam(name: 'pipelineZipsConsoleLog', defaultValue: 'True', description: 'If true, the pipeline script retrieves the job console log, zips it and archives it as artifact') booleanParam(name: 'pipelineZipsConsoleLog', defaultValue: 'True', description: 'If true, the pipeline script retrieves the job console log, zips it and archives it as artifact')
string(name: 'smartphonesResource', defaultValue: 'CI-Bench-1-Phones', description: 'Lockeable Resource to prevent multiple jobs to run simultaneously with the same resource') string(name: 'lockResources', defaultValue: 'CI-Bench-1-Phones', description: 'Lockeable Resource to prevent multiple jobs to run simultaneously with the same resource')
//eNB parameters //eNB parameters
string(name: 'eNB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of eNB') string(name: 'eNB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of eNB')
...@@ -115,8 +113,9 @@ pipeline { ...@@ -115,8 +113,9 @@ pipeline {
testStageName = 'Template Test Stage' testStageName = 'Template Test Stage'
} }
if (params.smartphonesResource == null) { if (params.LockResources == null) {
allParametersPresent = false echo "no LockResources given"
allParametersPresent = false
} }
if (params.eNB_IPAddress == null) { if (params.eNB_IPAddress == null) {
allParametersPresent = false allParametersPresent = false
......
...@@ -33,8 +33,9 @@ def buildStageStatus = true ...@@ -33,8 +33,9 @@ def buildStageStatus = true
// Name of the test stage // Name of the test stage
def testStageName = params.pipelineTestStageName def testStageName = params.pipelineTestStageName
// Name of the phone resource def lockResources = []
def ciSmartPhoneResource = params.smartphonesResource if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Terminate Status // Terminate Status
def termUE = 0 def termUE = 0
...@@ -64,7 +65,7 @@ pipeline { ...@@ -64,7 +65,7 @@ pipeline {
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
ansiColor('xterm') ansiColor('xterm')
lock (ciSmartPhoneResource) lock(extra: lockResources)
} }
stages { stages {
stage ("Verify Parameters") { stage ("Verify Parameters") {
...@@ -83,8 +84,9 @@ pipeline { ...@@ -83,8 +84,9 @@ pipeline {
testStageName = 'Template Test Stage' testStageName = 'Template Test Stage'
} }
if (params.smartphonesResource == null) { if (params.LockResources == null) {
allParametersPresent = false echo "no LockResources given"
allParametersPresent = false
} }
if (params.UE_IPAddress == null) { if (params.UE_IPAddress == null) {
allParametersPresent = false allParametersPresent = false
......
...@@ -73,36 +73,50 @@ done ...@@ -73,36 +73,50 @@ done
LABELS=`curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/$MERGE_REQUEST_ID" | jq '.labels' || true` LABELS=`curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/$MERGE_REQUEST_ID" | jq '.labels' || true`
IS_MR_BUILD_ONLY=`echo $LABELS | grep -c BUILD-ONLY || true` IS_MR_DOCUMENTATION=`echo $LABELS | grep -ic documentation`
IS_MR_CI=`echo $LABELS | grep -c CI || true` IS_MR_BUILD_ONLY=`echo $LABELS | grep -c BUILD-ONLY`
IS_MR_4G=`echo $LABELS | grep -c 4G-LTE || true` IS_MR_CI=`echo $LABELS | grep -c CI`
IS_MR_5G=`echo $LABELS | grep -c 5G-NR || true` IS_MR_4G=`echo $LABELS | grep -c 4G-LTE`
IS_MR_5G=`echo $LABELS | grep -c 5G-NR`
# First case: none is present! No CI # none is present! No CI
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 0 ] if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 0 ] && [ $IS_MR_DOCUMENTATION -eq 0 ]
then then
echo "NONE" echo "NONE"
exit 0 exit 0
fi fi
# Second case: Build-Only # 4G and 5G or CI labels: run everything (4G, 5G)
if [ $IS_MR_BUILD_ONLY -eq 1 ] if [ $IS_MR_4G -eq 1 ] && [ $IS_MR_5G -eq 1 ] || [ $IS_MR_CI -eq 1 ]
then then
echo "BUILD-ONLY" echo "FULL"
exit 0 exit 0
fi fi
# Third case: CI or 4G label --> Full CI run # 4G is present: run only 4G
if [ $IS_MR_4G -eq 1 ] || [ $IS_MR_CI -eq 1 ] if [ $IS_MR_4G -eq 1 ]
then then
echo "FULL" echo "SHORTEN-4G"
exit 0 exit 1
fi fi
# Fourth case: 5G label # 5G is present: run only 5G
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 1 ] if [ $IS_MR_5G -eq 1 ]
then then
echo "SHORTEN-5G" echo "SHORTEN-5G"
exit 0 exit 0
fi fi
# BUILD-ONLY is present: only build stages
if [ $IS_MR_BUILD_ONLY -eq 1 ]
then
echo "BUILD-ONLY"
exit 0
fi
# Documentation is present: don't do anything
if [ $IS_MR_DOCUMENTATION -eq 1 ]
then
echo "documentation"
exit 1
fi
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
| idefix | 172.21.16.135 | CI-NSA-MiniBench | Quectel | Quectel module | | idefix | 172.21.16.135 | CI-NSA-MiniBench | Quectel | Quectel module |
| amariue | 172.21.16.144 | CI-Amarisoft-UE-Usage | nrUE | Amarisoft UE simulator | | amariue | 172.21.16.144 | CI-Amarisoft-UE-Usage | nrUE | Amarisoft UE simulator |
| bellatrix | 192.168.117.115 | CI-RAN-VM-Deployment | Executor | -- | | bellatrix | 192.168.117.115 | CI-RAN-VM-Deployment | Executor | -- |
| nano | 192.168.12.62 | CI-Bench-1-Phones | EPC, adb | 2x COTS (adb) | | nano | 172.21.18.48 | CI-Bench-1-Phones | EPC, adb | 2x COTS (adb) |
| hutch | 192.168.12.19 | CI-Bench-1-Phones | eNB (B7) | B200mini (30C5239) | | hutch | 172.21.18.46 | CI-Bench-1-Phones | eNB (B7) | B200mini (30C5239) |
| starsky | 192.168.12.18 | CI-Bench-1-Phones | eNB (B40) | b200mini (30A3E3C) | | starsky | 172.21.18.45 | CI-Bench-1-Phones | eNB (B40) | b200mini (30A3E3C) |
| carabe | 192.168.12.211 | CI-Bench-2-OAI-Phone | UE (B7UE) | B200mini (30AE8C9) | | carabe | 172.21.18.47 | CI-Bench-2-OAI-Phone | UE (B7UE) | B200mini (30AE8C9) |
Note: The available resources, and their current usage, is indicated here: Note: The available resources, and their current usage, is indicated here:
- [Lockable resources of jenkins-oai](https://jenkins-oai.eurecom.fr/lockable-resources/): - [Lockable resources of jenkins-oai](https://jenkins-oai.eurecom.fr/lockable-resources/):
...@@ -97,7 +97,8 @@ Webhook ...@@ -97,7 +97,8 @@ Webhook
- obelix + B200, nepes + B200, idefix + Quectel, porcepix w/ sabox - obelix + B200, nepes + B200, idefix + Quectel, porcepix w/ sabox
- basic SA test (40 MHz TDD) - basic SA test (40 MHz TDD)
- [RAN-PhySim-Cluster](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-Cluster/) - [RAN-PhySim-Cluster](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-Cluster/)
- asterix (`Asterix-OC-oaicicd-session` resource), tests in OpenShift Cluster - poseidon (jumphost, `Asterix-OC-oaicicd-session` resource), tests in
OpenShift Cluster
- unitary simulators (`nr_dlsim`, etc.) - unitary simulators (`nr_dlsim`, etc.)
- [RAN-RF-Sim-Test-4G](https://jenkins-oai.eurecom.fr/job/RAN-RF-Sim-Test-4G/) - [RAN-RF-Sim-Test-4G](https://jenkins-oai.eurecom.fr/job/RAN-RF-Sim-Test-4G/)
- obelix (eNB, 1x UE, OAI EPC) - obelix (eNB, 1x UE, OAI EPC)
...@@ -106,8 +107,8 @@ Webhook ...@@ -106,8 +107,8 @@ Webhook
- obelix (gNB, 2x UE, OAI 5GC) - obelix (gNB, 2x UE, OAI 5GC)
- uses RFsimulator, TDD 40MHz, FDD 40MHz, F1 split - uses RFsimulator, TDD 40MHz, FDD 40MHz, F1 split
- [RAN-RHEL8-Cluster-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-RHEL8-Cluster-Image-Builder/) - [RAN-RHEL8-Cluster-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-RHEL8-Cluster-Image-Builder/)
- asterix (`Asterix-OC-oaicicd-session` resource): RHEL 8 image build using - poseidon (jumphost, `Asterix-OC-oaicicd-session` resource): RHEL 8 image
the OpenShift in Eurecom build using the OpenShift Cluster
- [RAN-Ubuntu18-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/) - [RAN-Ubuntu18-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/)
- obelix: Ubuntu 18 image build using docker - obelix: Ubuntu 18 image build using docker
...@@ -144,10 +145,6 @@ runs tests: ...@@ -144,10 +145,6 @@ runs tests:
- bellatrix: runs 4G/5G simulators directly (eNB + 1x UE + (opt.) OAI EPC, gNB + 1x UE in "noS1") - bellatrix: runs 4G/5G simulators directly (eNB + 1x UE + (opt.) OAI EPC, gNB + 1x UE in "noS1")
triggers pipelines: triggers pipelines:
- [eNB-CI-F1-FDD-Band7-B210](https://open5glab.eurecom.fr:8083/jenkins/job/eNB-CI-F1-FDD-Band7-B210/)
- hutch + B210, nano w/ ltebox + 2x UE
- tests 4G FDD with F1 split, 5MHz, 10MHz, 20MHz. 5MHz stable, rest known to
be unstable
- [eNB-CI-FDD-Band7-B210](https://open5glab.eurecom.fr:8083/jenkins/job/eNB-CI-FDD-Band7-B210/) - [eNB-CI-FDD-Band7-B210](https://open5glab.eurecom.fr:8083/jenkins/job/eNB-CI-FDD-Band7-B210/)
- hutch + B210, nano w/ ltebox + 2x UE - hutch + B210, nano w/ ltebox + 2x UE
- tests T tracer, information through FlexRAN, RRC inactivity timers, - tests T tracer, information through FlexRAN, RRC inactivity timers,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment