Commit 8341c820 authored by Raphael Defosseux's avatar Raphael Defosseux

CI: the FED test run is now a GitLab notification

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 32ad1d24
...@@ -52,7 +52,8 @@ pipeline { ...@@ -52,7 +52,8 @@ pipeline {
gitlabBuilds(builds: [ gitlabBuilds(builds: [
"Build AMF Image", "Build AMF Image",
"Static Code Analysis", "Static Code Analysis",
"Code Formatting Checker" "Code Formatting Checker",
"Test with DsTester"
]) ])
} }
...@@ -79,6 +80,7 @@ pipeline { ...@@ -79,6 +80,7 @@ pipeline {
} else { } else {
echo "Node is ${NODE_NAME}" echo "Node is ${NODE_NAME}"
} }
echo "Git URL is ${GIT_URL}"
} }
} }
} }
...@@ -90,7 +92,7 @@ pipeline { ...@@ -90,7 +92,7 @@ pipeline {
gitCommitAuthorEmailAddr = env.gitlabUserEmail gitCommitAuthorEmailAddr = env.gitlabUserEmail
echo "GitLab Usermail is ${gitCommitAuthorEmailAddr}" echo "GitLab Usermail is ${gitCommitAuthorEmailAddr}"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}" sh "./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
amf_tag = "ci-temp" amf_tag = "ci-tmp"
amf_branch = env.gitlabSourceBranch amf_branch = env.gitlabSourceBranch
} else { } else {
echo "Git Branch is ${GIT_BRANCH}" echo "Git Branch is ${GIT_BRANCH}"
...@@ -236,18 +238,20 @@ pipeline { ...@@ -236,18 +238,20 @@ pipeline {
stage ('Testing in CN-5G-FED environment') { stage ('Testing in CN-5G-FED environment') {
steps { steps {
script { script {
localStatus = build job: 'CI-OpenAir-CN5G-FED', gitlabCommitStatus(name: "Test with DsTester") {
parameters: [ localStatus = build job: 'CI-OpenAir-CN5G-FED',
string(name: 'AMF_TAG', value: String.valueOf(amf_tag)), parameters: [
string(name: 'AMF_BRANCH', value: String.valueOf(amf_branch)) string(name: 'AMF_TAG', value: String.valueOf(amf_tag)),
], propagate: false string(name: 'AMF_BRANCH', value: String.valueOf(amf_branch))
localResult = localStatus.getResult() ], propagate: false
localResult = localStatus.getResult()
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) { if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "Federation Test Job is OK" echo "Federation Test Job is OK"
} else { } else {
echo "Federation Test Job is KO" echo "Federation Test Job is KO"
sh "ci-scripts/fail.sh" sh "ci-scripts/fail.sh"
}
} }
} }
} }
...@@ -286,7 +290,7 @@ pipeline { ...@@ -286,7 +290,7 @@ pipeline {
// Removing temporary / intermediate images // Removing temporary / intermediate images
try { try {
if ("MERGE".equals(env.gitlabActionType)) { if ("MERGE".equals(env.gitlabActionType)) {
myShCmd('docker image rm --force oai-amf:ci-temp', new_host_flag, new_host_user, new_host) myShCmd('docker image rm --force oai-amf:ci-tmp', new_host_flag, new_host_user, new_host)
} }
} catch (Exception e) { } catch (Exception e) {
echo "We failed to delete the OAI-AMF temp image" echo "We failed to delete the OAI-AMF temp image"
......
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