Commit 9bf0b899 authored by Raphael Defosseux's avatar Raphael Defosseux

[CI] Gitlab notification was missing for the RHEL8 stage

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@openairinterface.org>
parent a9ed89a3
...@@ -217,27 +217,29 @@ pipeline { ...@@ -217,27 +217,29 @@ pipeline {
steps { steps {
lock (rem_rhel8_resource) { lock (rem_rhel8_resource) {
script { script {
if ("PUSH".equals(env.gitlabActionType)) { gitlabCommitStatus(name: "Build RHEL8 SMF Image") {
// Currently this pipeline only runs for pushes to `develop` branch if ("PUSH".equals(env.gitlabActionType)) {
// First clean image registry // Currently this pipeline only runs for pushes to `develop` branch
try { // First clean image registry
myShCmd('sudo podman image rm oai-smf:develop || true', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) try {
} catch (Exception e) { myShCmd('sudo podman image rm oai-smf:develop || true', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
echo "Maybe a previous build went wrong" } catch (Exception e) {
} echo "Maybe a previous build went wrong"
} else { }
// In case we forgot during a previous run } else {
myShCmd('sudo podman image rm oai-smf:' + smf_tag + ' || true', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) // In case we forgot during a previous run
} myShCmd('sudo podman image rm oai-smf:' + smf_tag + ' || true', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman image prune --force', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) }
// Copy the RHEL Host certificates for building myShCmd('sudo podman image prune --force', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('mkdir -p tmp/ca tmp/entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) // Copy the RHEL Host certificates for building
myShCmd('cp /etc/pki/entitlement/*pem tmp/entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('mkdir -p tmp/ca tmp/entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('cp /etc/pki/entitlement/*pem tmp/entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman build --no-cache --target oai-smf --tag oai-smf:' + smf_tag + ' --file docker/Dockerfile.smf.rhel8.2 --build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" . > archives/smf_podman_image_build.log 2>&1', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman image ls >> archives/smf_podman_image_build.log', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo podman build --no-cache --target oai-smf --tag oai-smf:' + smf_tag + ' --file docker/Dockerfile.smf.rhel8.2 --build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" . > archives/smf_podman_image_build.log 2>&1', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
if ("MERGE".equals(env.gitlabActionType)) { myShCmd('sudo podman image ls >> archives/smf_podman_image_build.log', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman image tag oai-smf:' + smf_tag + ' oai-smf:' + rhel_smf_tag, rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) if ("MERGE".equals(env.gitlabActionType)) {
myShCmd('sudo podman image tag oai-smf:' + smf_tag + ' oai-smf:' + rhel_smf_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