Commit bbb74899 authored by Raphael Defosseux's avatar Raphael Defosseux

CI: better reporting

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 6d028fb1
...@@ -518,7 +518,7 @@ pipeline { ...@@ -518,7 +518,7 @@ pipeline {
// Making sure that we really shutdown every thing before leaving // Making sure that we really shutdown every thing before leaving
failure { failure {
script { script {
if ((!termStatusArray[termUE]) && (params.ADBIPAddress != "none")) { if ((!termStatusArray[termUE]) && (params.ADB_IPAddress != "none")) {
withCredentials([ withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password'] [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
]) { ]) {
......
...@@ -189,8 +189,6 @@ class Containerize(): ...@@ -189,8 +189,6 @@ class Containerize():
mySSH.command('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca/', '\$', 5) mySSH.command('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca/', '\$', 5)
mySSH.command('sudo cp /etc/pki/entitlement/*.pem tmp/entitlement/', '\$', 5) mySSH.command('sudo cp /etc/pki/entitlement/*.pem tmp/entitlement/', '\$', 5)
#mySSH.close()
#return 0
sharedimage = 'ran-build' sharedimage = 'ran-build'
# Let's remove any previous run artifacts if still there # Let's remove any previous run artifacts if still there
mySSH.command(self.cli + ' image prune --force', '\$', 5) mySSH.command(self.cli + ' image prune --force', '\$', 5)
...@@ -214,7 +212,6 @@ class Containerize(): ...@@ -214,7 +212,6 @@ class Containerize():
danglingShaOnes.append((image, result.group('imageShaOne'))) danglingShaOnes.append((image, result.group('imageShaOne')))
previousImage = image + ':' + imageTag previousImage = image + ':' + imageTag
imageTag = 'ci-temp'
# First verify if images were properly created. # First verify if images were properly created.
status = True status = True
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + sharedimage + ':' + imageTag, '\$', 5) mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + sharedimage + ':' + imageTag, '\$', 5)
...@@ -286,14 +283,16 @@ class Containerize(): ...@@ -286,14 +283,16 @@ class Containerize():
mySSH.command('cd cmake_targets', '\$', 5) mySSH.command('cd cmake_targets', '\$', 5)
mySSH.command('mkdir -p build_log_' + self.testCase_id, '\$', 5) mySSH.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
mySSH.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5) mySSH.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
#mySSH.close()
mySSH.command('cd /tmp/CI-eNB/cmake_targets', '\$', 5) mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
mySSH.command('rm -f build_log_' + self.testCase_id + '.zip || true', '\$', 5)
if (os.path.isfile('./build_log_' + self.testCase_id + '.zip')): if (os.path.isfile('./build_log_' + self.testCase_id + '.zip')):
os.remove('./build_log_' + self.testCase_id + '.zip') os.remove('./build_log_' + self.testCase_id + '.zip')
if (os.path.isdir('./build_log_' + self.testCase_id)):
shutil.rmtree('./build_log_' + self.testCase_id)
mySSH.command('zip -r -qq build_log_' + self.testCase_id + '.zip build_log_' + self.testCase_id, '\$', 5) mySSH.command('zip -r -qq build_log_' + self.testCase_id + '.zip build_log_' + self.testCase_id, '\$', 5)
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '.zip', '.') mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '.zip', '.')
#mySSH.command('rm -f build_log_' + self.testCase_id + '.zip','\$', 5) mySSH.command('rm -f build_log_' + self.testCase_id + '.zip','\$', 5)
mySSH.close() mySSH.close()
ZipFile('build_log_' + self.testCase_id + '.zip').extractall('.') ZipFile('build_log_' + self.testCase_id + '.zip').extractall('.')
......
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