fix(ci): proper usage of flag for merge request

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
Raphael Defosseux
2021-11-14 17:36:21 +01:00
parent 76d299f127
commit 300af2c5ab
4 changed files with 14 additions and 11 deletions
+2 -2
View File
@@ -134,8 +134,8 @@ pipeline {
eNB_CommitID = params.eNB_CommitID eNB_CommitID = params.eNB_CommitID
} }
echo "eNB_CommitID : ${eNB_CommitID}" echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_AllowMergeRequestProcess!= null) { if (params.eNB_mergeRequest!= null) {
eNB_AllowMergeRequestProcess = params.eNB_AllowMergeRequestProcess eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) { if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch eNB_TargetBranch = params.eNB_TargetBranch
@@ -145,8 +145,8 @@ pipeline {
// eNB_CommitID = params.eNB_CommitID // eNB_CommitID = params.eNB_CommitID
//} //}
echo "eNB_CommitID : ${eNB_CommitID}" echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_AllowMergeRequestProcess!= null) { if (params.eNB_mergeRequest!= null) {
eNB_AllowMergeRequestProcess = params.eNB_AllowMergeRequestProcess eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) { if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch eNB_TargetBranch = params.eNB_TargetBranch
+6 -3
View File
@@ -137,8 +137,8 @@ pipeline {
eNB_CommitID = params.eNB_CommitID eNB_CommitID = params.eNB_CommitID
} }
echo "eNB_CommitID : ${eNB_CommitID}" echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_AllowMergeRequestProcess!= null) { if (params.eNB_mergeRequest!= null) {
eNB_AllowMergeRequestProcess = params.eNB_AllowMergeRequestProcess eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) { if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch eNB_TargetBranch = params.eNB_TargetBranch
@@ -168,6 +168,9 @@ pipeline {
if (params.ADB_Credentials == null) { if (params.ADB_Credentials == null) {
allParametersPresent = false allParametersPresent = false
} }
if (params.DataBaseHost == "none") {
DataBaseHost = pythonExecutor
}
if (allParametersPresent) { if (allParametersPresent) {
echo "All parameters are present" echo "All parameters are present"
@@ -319,7 +322,7 @@ pipeline {
} }
stage ("SQL Collect"){ stage ("SQL Collect"){
when { when {
expression { DataBaseHost != "none" } expression { params.DataBaseHost != "none" }
} }
agent {label DataBaseHost} agent {label DataBaseHost}
steps { steps {
+4 -4
View File
@@ -53,7 +53,7 @@ pipeline {
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
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_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
] ]
//calling NSA 2x2 //calling NSA 2x2
build job: "RAN-NSA-2x2-Module-OAIEPC", wait : true, propagate : false, parameters: [ build job: "RAN-NSA-2x2-Module-OAIEPC", wait : true, propagate : false, parameters: [
@@ -61,7 +61,7 @@ pipeline {
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
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_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
] ]
//calling LTE 2x2 //calling LTE 2x2
build job: "RAN-LTE-2x2-Module-OAIEPC", wait : true, propagate : false, parameters: [ build job: "RAN-LTE-2x2-Module-OAIEPC", wait : true, propagate : false, parameters: [
@@ -69,7 +69,7 @@ pipeline {
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
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_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
] ]
//calling SA //calling SA
build job: "RAN-SA-Module-CN5G", wait : true, propagate : false, parameters: [ build job: "RAN-SA-Module-CN5G", wait : true, propagate : false, parameters: [
@@ -77,7 +77,7 @@ pipeline {
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
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_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
] ]
} }