fix(ci): remove intermediate build images

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
Raphael Defosseux
2021-12-20 10:32:13 +01:00
parent b04731d756
commit bfd3a1264c
+6
View File
@@ -338,6 +338,12 @@ class Containerize():
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.command('rm -f build_log_' + self.testCase_id + '.zip','\$', 5)
# Remove all intermediate build images
if self.ranAllowMerge and forceBaseImageBuild:
mySSH.command(self.cli + ' image rm ' + baseImage + ':' + baseTag + ' || true', '\$', 30)
for image,pattern in imageNames:
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag + ' || true', '\$', 30)
mySSH.command('docker rmi ran-build:' + imageTag,'\$', 5)
mySSH.close()
ZipFile('build_log_' + self.testCase_id + '.zip').extractall('.')