Commit d774d09d authored by Raphael Defosseux's avatar Raphael Defosseux

CI: proper gitlab notifications for FDD/TDD test

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 1fe75d1f
...@@ -31,8 +31,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { ...@@ -31,8 +31,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
} }
def doRedHatBuild = false def doRedHatBuild = false
def FDD_Band7_B210_Status
def TDD_Band40_B210_Status
pipeline { pipeline {
agent { agent {
...@@ -267,19 +265,21 @@ pipeline { ...@@ -267,19 +265,21 @@ pipeline {
stages { stages {
stage ("Test FDD - Band 7 - B210") { stage ("Test FDD - Band 7 - B210") {
steps { steps {
gitlabCommitStatus(name: "Test-FDD-Band7") {
script { script {
try { try {
if ("MERGE".equals(env.gitlabActionType)) { if ("MERGE".equals(env.gitlabActionType)) {
FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', gitlabCommitStatus(name: "Test-FDD-Band7") {
build job: 'eNB-CI-FDD-Band7-B210',
parameters: [ parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
booleanParam(name: 'eNB_mergeRequest', value: true) booleanParam(name: 'eNB_mergeRequest', value: true)
] ]
}
} else { } else {
FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', gitlabCommitStatus(name: "Test-FDD-Band7") {
build job: 'eNB-CI-FDD-Band7-B210',
parameters: [ parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
...@@ -287,12 +287,12 @@ pipeline { ...@@ -287,12 +287,12 @@ pipeline {
booleanParam(name: 'eNB_mergeRequest', value: false) booleanParam(name: 'eNB_mergeRequest', value: false)
] ]
} }
}
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
} }
} }
} }
}
post { post {
// In case of any non-success, we are retrieving the HTML report of the last completed // In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. // slave job.
...@@ -313,19 +313,21 @@ pipeline { ...@@ -313,19 +313,21 @@ pipeline {
} }
stage ("Test TDD - Band 40 - B210") { stage ("Test TDD - Band 40 - B210") {
steps { steps {
gitlabCommitStatus(name: "Test-TDD-Band40") {
script { script {
try { try {
if ("MERGE".equals(env.gitlabActionType)) { if ("MERGE".equals(env.gitlabActionType)) {
TDD_Band40_B210_Status = build job: 'eNB-CI-TDD-Band40-B210', gitlabCommitStatus(name: "Test-TDD-Band40") {
build job: 'eNB-CI-TDD-Band40-B210',
parameters: [ parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
booleanParam(name: 'eNB_mergeRequest', value: true) booleanParam(name: 'eNB_mergeRequest', value: true)
] ]
}
} else { } else {
TDD_Band40_B210_Status = build job: 'eNB-CI-TDD-Band40-B210', gitlabCommitStatus(name: "Test-TDD-Band40") {
build job: 'eNB-CI-TDD-Band40-B210',
parameters: [ parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
...@@ -333,12 +335,12 @@ pipeline { ...@@ -333,12 +335,12 @@ pipeline {
booleanParam(name: 'eNB_mergeRequest', value: false) booleanParam(name: 'eNB_mergeRequest', value: false)
] ]
} }
}
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
} }
} }
} }
}
post { post {
// In case of any non-success, we are retrieving the HTML report of the last completed // In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. // slave job.
......
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