Commit 8e7e120f authored by ismail's avatar ismail
Browse files

CI: pipeline updated to trigger the sub OC FED pipeline


Signed-off-by: default avatarismail <mohammed.ismail@openairinterface.org>
parent 2a5f05dd
Pipeline #26207 canceled with stage
in 0 seconds
......@@ -368,32 +368,66 @@ pipeline {
}
}
}
stage ('Testing in CN-5G-FED environment') {
steps {
script {
gitlabCommitStatus(name: "Test with DsTester") {
localStatus = build job: params.CN5G_FED_PipelineName,
parameters: [
string(name: 'NRF_TAG', value: String.valueOf(nrf_tag)),
string(name: 'NRF_BRANCH', value: String.valueOf(nrf_branch))
], propagate: false
localResult = localStatus.getResult()
stage('Testing whole 5g Core Network Functions') {
parallel {
stage ('Testing in CN-5G-FED Docker environment') {
steps {
script {
gitlabCommitStatus(name: "Test with DsTester on Docker environment") {
localStatus = build job: params.CN5G_FED_PipelineName,
parameters: [
string(name: 'NRF_TAG', value: String.valueOf(nrf_tag)),
string(name: 'NRF_BRANCH', value: String.valueOf(nrf_branch))
], propagate: false
localResult = localStatus.getResult()
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "Federation Test Job is OK"
} else {
echo "Federation Test Job is KO"
sh "ci-scripts/fail.sh"
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "Docker Federation Test Job is OK"
} else {
echo "Docker Federation Test Job is KO"
sh "ci-scripts/fail.sh"
}
}
}
}
post {
always {
script {
copyArtifacts(projectName: params.CN5G_FED_PipelineName,
filter: '*_results_oai_cn5g.html',
selector: lastCompleted())
}
}
}
}
}
post {
always {
script {
copyArtifacts(projectName: params.CN5G_FED_PipelineName,
filter: '*_results_oai_cn5g.html',
selector: lastCompleted())
stage ('Testing in CN-5G-FED environment OC environment') {
steps {
script {
gitlabCommitStatus(name: "Test with DsTester on OC environment") {
localStatus = build job: params.CN5G_FED_OC_PipelineName,
parameters: [
string(name: 'NRF_TAG', value: String.valueOf(nrf_tag)),
string(name: 'NRF_BRANCH', value: String.valueOf(nrf_branch))
], propagate: false
localResult = localStatus.getResult()
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "OC Federation Test Job is OK"
} else {
echo "OC Federation Test Job is KO"
sh "ci-scripts/fail.sh"
}
}
}
}
post {
always {
script {
copyArtifacts(projectName: params.CN5G_FED_OC_PipelineName,
filter: '*_results_oai_cn5g_oc.html',
selector: lastCompleted())
}
}
}
}
}
......@@ -473,6 +507,10 @@ pipeline {
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_LINK#${gitlabMergeRequestLink}#g' *_results_oai_nrf_bt.html"
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_TEMPLATE#${env.gitlabMergeRequestTitle}#' *_results_oai_nrf_bt.html"
}
if (fileExists('test_results_oai_cn5g_oc.html')) {
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_LINK#${gitlabMergeRequestLink}#g' *_results_oai_cn5g_oc.html"
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_TEMPLATE#${env.gitlabMergeRequestTitle}#' *_results_oai_cn5g_oc.html"
}
} else {
sh "python3 ci-scripts/generateHtmlReport.py --job_name=${JOB_NAME} --job_id=${BUILD_ID} --job_url=${BUILD_URL} --git_url=${GIT_URL} --git_src_branch=${GIT_BRANCH} --git_src_commit=${GIT_COMMIT}"
}
......@@ -489,6 +527,10 @@ pipeline {
sh "sed -i -e 's#TEMPLATE_TIME#${JOB_TIMESTAMP}#' *_results_oai_nrf_bt.html"
archiveArtifacts artifacts: '*_results_oai_nrf_bt.html'
}
if (fileExists('test_results_oai_cn5g_oc.html')) {
sh "sed -i -e 's#TEMPLATE_TIME#${JOB_TIMESTAMP}#' *_results_oai_cn5g_oc.html"
archiveArtifacts artifacts: '*_results_oai_cn5g_oc.html'
}
// Sending email to commiter
if (params.sendToCommitterEmail != null) {
......
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