Commit 7c5b7a98 authored by Raphael Defosseux's avatar Raphael Defosseux

fix(ci): during RHEL8 build, squashing during build, no intermediate layer containing certificates

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@openairinterface.org>
parent 8c76eaf5
......@@ -257,10 +257,7 @@ pipeline {
myShCmd('cp /etc/pki/entitlement/*pem ./etc-pki-entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo cp /etc/rhsm/rhsm.conf ./rhsm-conf', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo cp /etc/rhsm/ca/*pem ./rhsm-ca', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman build --no-cache --target oai-nrf --tag oai-nrf:' + nrf_tag + ' --file docker/Dockerfile.nrf.rhel8 --format docker . > archives/nrf_podman_image_build.log 2>&1', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
// Putting a place holder to try out on the flattening of image.
// If not satisfactory, we can remove it.
myShCmd('python3 ./ci-scripts/flatten_image.py --tag oai-nrf:' + nrf_tag, rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman build --no-cache --squash --target oai-nrf --tag oai-nrf:' + nrf_tag + ' --file docker/Dockerfile.nrf.rhel8 --format docker . > archives/nrf_podman_image_build.log 2>&1', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman image ls >> archives/nrf_podman_image_build.log', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
if ("MERGE".equals(env.gitlabActionType)) {
myShCmd('sudo podman image tag oai-nrf:' + nrf_tag + ' oai-nrf:' + rhel_nrf_tag, rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
......
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