Commit 06fe1425 authored by hardy's avatar hardy

adding benetel to overnight trig

parent c4480a4d
This diff is collapsed.
...@@ -34,8 +34,9 @@ def buildStageStatus = true ...@@ -34,8 +34,9 @@ def buildStageStatus = true
def testStageName = params.pipelineTestStageName def testStageName = params.pipelineTestStageName
// Name of the phone resource // Name of the phone resource
def ciSmartPhoneResource1 = params.smartphonesResource1 def ciSmartPhonesResource1 = params.SmartPhonesResource1
def ciSmartPhoneResource2 = params.smartphonesResource2 def ciSmartPhonesResource2 = params.SmartPhonesResource2
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
...@@ -52,7 +53,7 @@ pipeline { ...@@ -52,7 +53,7 @@ pipeline {
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
ansiColor('xterm') ansiColor('xterm')
lock(extra: [[resource: ciSmartPhoneResource2]], resource: ciSmartPhoneResource1) lock(extra: [[resource: ciSmartPhonesResource2],[resource: ciSmartPhonesResource3]], resource: ciSmartPhonesResource1)
} }
stages { stages {
stage("Build Init") { stage("Build Init") {
...@@ -78,10 +79,13 @@ pipeline { ...@@ -78,10 +79,13 @@ pipeline {
testStageName = 'Template Test Stage' testStageName = 'Template Test Stage'
} }
if (params.smartphonesResource1 == null) { if (params.SmartPhonesResource1 == null) {
allParametersPresent = false allParametersPresent = false
} }
if (params.smartphonesResource2 == null) { if (params.SmartPhonesResource2 == null) {
allParametersPresent = false
}
if (params.SmartPhonesResource3== null) {
allParametersPresent = false allParametersPresent = false
} }
// 1st eNB parameters // 1st eNB parameters
......
...@@ -33,19 +33,21 @@ pipeline { ...@@ -33,19 +33,21 @@ pipeline {
label pythonExecutor label pythonExecutor
} }
stages { stages {
stage ("NSA Test Loop") { stage ("Launcher") {
steps { steps {
script { script {
//retrieve MR that are opened nd with tag READY_TO_BE_MERGED
MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=READY_TO_BE_MERGED" | jq ".[].iid" || true ' MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=READY_TO_BE_MERGED" | jq ".[].iid" || true '
echo "List of selected MR:\n${MR_LIST}" echo "List of selected MR:\n${MR_LIST}"
def MR_ARRAY = MR_LIST.split('\n') def MR_ARRAY = MR_LIST.split('\n')
//for every selected MR, retrieve the branch name and the latest commit
for (MR in MR_ARRAY) { for (MR in MR_ARRAY) {
SRC_BRANCH=sh returnStdout: true, script: """curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/${MR}" | jq ".source_branch" || true """ SRC_BRANCH=sh returnStdout: true, script: """curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/${MR}" | jq ".source_branch" || true """
SRC_BRANCH=SRC_BRANCH.trim() SRC_BRANCH=SRC_BRANCH.trim()
COMMIT_ID=sh returnStdout: true, script: """curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/${MR}" | jq ".sha" || true """ COMMIT_ID=sh returnStdout: true, script: """curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/${MR}" | jq ".sha" || true """
COMMIT_ID=COMMIT_ID.trim() COMMIT_ID=COMMIT_ID.trim()
echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}" echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}"
//calling sub job //calling NSA sub job
build job: "RAN-CI-NSA-B210", wait : false, propagate : false, parameters: [ build job: "RAN-CI-NSA-B210", wait : false, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)), string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
...@@ -53,6 +55,14 @@ pipeline { ...@@ -53,6 +55,14 @@ pipeline {
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
] ]
//calling Benetel sub job
build job: "RAN-CI-BENETEL", wait : false, propagate : false, parameters: [
string(name: 'eNB_MR', value: String.valueOf(MR)),
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE))
]
} }
} }
} }
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<eNB_instance>0</eNB_instance> <eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId> <eNB_serverId>0</eNB_serverId>
<backgroundBuild>True</backgroundBuild> <backgroundBuild>True</backgroundBuild>
<forced_workspace_cleanup>True</forced_workspace_cleanup>
</testCase> </testCase>
<testCase id="000004"> <testCase id="000004">
...@@ -53,6 +54,7 @@ ...@@ -53,6 +54,7 @@
<eNB_instance>1</eNB_instance> <eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId> <eNB_serverId>1</eNB_serverId>
<backgroundBuild>True</backgroundBuild> <backgroundBuild>True</backgroundBuild>
<forced_workspace_cleanup>True</forced_workspace_cleanup>
</testCase> </testCase>
<testCase id="000003"> <testCase id="000003">
......
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