diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index d83facb5db3811b439084301983839cd50ca4b52..41747f1bc26bd0de31813ac3ff2c64e1de899653 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -209,8 +209,7 @@ class Containerize(): # if asterix, copy the entitlement and subscription manager configurations if self.host == 'Red Hat': - mySSH.command('mkdir -p tmp/ca/', '\$', 5) - mySSH.command('mkdir -p tmp/entitlement/', '\$', 5) + mySSH.command('mkdir -p tmp/ca/ tmp/entitlement/', '\$', 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) @@ -288,7 +287,7 @@ class Containerize(): # we need to update them with proper tag mySSH.command('sed -i -e "s#' + baseImage + ':latest#' + baseImage + ':' + baseTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5) if image != 'ran-build': - mySSH.command('sed -i -e "s#' + "ran-build" + ':latest#' + "ran-build" + ':' + baseTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5) + mySSH.command('sed -i -e "s#' + "ran-build" + ':latest#' + "ran-build" + ':' + imageTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5) mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + image + ' --tag ' + image + ':' + imageTag + ' --file docker/Dockerfile.' + pattern + self.dockerfileprefix + ' . > cmake_targets/log/' + image + '.log 2>&1', '\$', 1200) # split the log mySSH.command('mkdir -p cmake_targets/log/' + image, '\$', 5) @@ -341,9 +340,7 @@ class Containerize(): # 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.command(self.cli + ' image rm ran-build:' + imageTag + ' || true','\$', 5) mySSH.close() ZipFile('build_log_' + self.testCase_id + '.zip').extractall('.')