Skip to content
Snippets Groups Projects
Commit ba761254 authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

chore(ci): adding Robot-Framework pipeline

parent 058ebb4a
No related branches found
No related tags found
No related merge requests found
Pipeline #41924 passed
......@@ -345,6 +345,36 @@ pipeline {
}
}
}
// Home-made RAN emulator
stage ('Robot-Test') {
steps {
script {
gitlabCommitStatus(name: "Robot-Test") {
localStatus = build job: 'OAI-CN5G-RobotTest',
parameters: [
string(name: 'PCF_TAG', value: String.valueOf(pcf_tag)),
string(name: 'PCF_BRANCH', value: String.valueOf(pcf_branch))
], propagate: false
localResult = localStatus.getResult()
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "Robot-Test is OK"
} else {
error "Robot-Test is is KO"
}
}
}
}
post {
always {
script {
copyArtifacts(projectName: 'OAI-CN5G-RobotTest',
filter: '*.html',
selector: lastCompleted())
}
}
}
}
}
}
// We are only publishing the Ubuntu image to Docker-Hub
......
......@@ -67,15 +67,23 @@ class HtmlReport():
gitInfo = generate_git_info(args)
cwd = os.getcwd()
for reportFile in os.listdir(cwd):
if reportFile.endswith('.html') and re.search('results_oai_cn5g_', reportFile) is not None:
if reportFile.endswith('.html') and (re.search('results_oai_cn5g_', reportFile) is not None or re.search('test_results_robot_', reportFile) is not None):
newFile = ''
robotBuildUrl = ''
gitInfoAppended = False
with open(os.path.join(cwd, reportFile), 'r') as rfile:
for line in rfile:
if re.search('<h2>', line) is not None and not gitInfoAppended:
gitInfoAppended = True
newFile += gitInfo
newFile += line
if re.search('OAI-CN5G-RobotTest -- Build-ID', line) is not None:
result = re.search('href="(?P<build_url>[a-zA-Z0-9\-\:\/\.]+)"', line)
if result is not None:
robotBuildUrl = result.group('build_url')
if re.search('archives/log.html', line) is not None:
newFile += re.sub('archives', f'{robotBuildUrl}/artifact/archives', line)
else:
newFile += line
with open(os.path.join(cwd, reportFile), 'w') as wfile:
wfile.write(newFile)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment