Commit 2782056c authored by arora's avatar arora

chore(ci): changing entitlement creation processes for openshift 4.17 and updating submodules

Signed-off-by: default avatararora <sagar.arora@openairinterface.org>
parent c0b91651
common-build @ 57ec65dc
Subproject commit 0968c25ea2414dac69181dc57a23ee17848c3111
Subproject commit 57ec65dc9feb53cf673169a23a1a0e1ba476415c
......@@ -54,6 +54,12 @@ DH_Account = "oaisoftwarealliance"
// Private Local Registry URL
PrivateRegistryURL = 'selfix.sboai.cs.eurecom.fr'
// Openshift project name
Namespace = 'oaicicd-core'
// Openshift server URL
server = 'https://api.oai.cs.eurecom.fr:6443'
//-------------------------------------------------------------------------------
// Pipeline start
pipeline {
......@@ -223,7 +229,7 @@ pipeline {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${rhelOcCredentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
]) {
sh "oc login -u ${OC_Username} -p ${OC_Password}"
sh "oc login -u ${OC_Username} -p ${OC_Password} --server=${server}"
}
sh "oc delete istag oai-upf:${upf_tag} || true"
// Copy the RHEL Host certificates for building
......@@ -231,6 +237,7 @@ pipeline {
// Building
sh "oc delete -f openshift/build-config.yaml || true"
sh "sed -i -e 's@oai-upf:latest@oai-upf:${upf_tag}@g' openshift/build-config.yaml"
sh "oc project ${Namespace}"
sh "oc create -f openshift/build-config.yaml"
// Trick to bypass bpftool build
sh "mkdir -p build/ext"
......@@ -245,7 +252,7 @@ pipeline {
// need python to wait for pod upf-build-cfg-1-build to be Completed or Error
// it fails if it detects error or timeout at 20 minutes
sh "./ci-scripts/common/python/check_build_pod_status.py --pod-name upf-build-cfg-1-build --log-file archives/upf_rhel_image_build.log"
sh "oc describe istag oai-upf:${upf_tag} | grep 'Image Size:' >> archives/upf_rhel_image_build.log"
sh "oc describe istag oai-upf:${upf_tag} -n ${Namespace} | grep 'Image Size:' >> archives/upf_rhel_image_build.log"
}
}
}
......@@ -259,7 +266,7 @@ pipeline {
}
cleanup {
script {
sh "oc delete build upf-build-cfg-1 || true"
sh "oc delete bc upf-build-cfg -n ${Namespace} || true"
sh "oc logout || true"
stash allowEmpty: true, includes: 'archives/upf_rhel_image_build.log', name: 'rhelBuildLog'
}
......
common @ 382e158f
Subproject commit 0a944b75fcd2a87c7831ed89a266061b9bae6531
Subproject commit 382e158f4ba0c40db45d271692ce3f6b6f3b5018
......@@ -36,10 +36,6 @@ ENV IS_DOCKERFILE=1
# Copy the entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement
# Copy the subscription manager configurations
COPY ./rhsm-conf /etc/rhsm
COPY ./rhsm-ca /etc/rhsm/ca
RUN rm /etc/rhsm-host && \
subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms && \
dnf update -y && \
......@@ -62,8 +58,7 @@ COPY . /openair-upf
WORKDIR /openair-upf/build/scripts
RUN ./build_upf --install-deps --force && \
# Remove entitlements and Subscription Manager configs
rm -rf /etc/pki/entitlement && \
rm -rf /etc/rhsm
rm -rf /etc/pki/entitlement
#---------------------------------------------------------------------
# BUILDER IMAGE
......@@ -83,9 +78,7 @@ ENV TZ=Europe/Paris
# Copy the entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement
# Copy the subscription manager configurations
COPY ./rhsm-conf /etc/rhsm
COPY ./rhsm-ca /etc/rhsm/ca
COPY --from=oai-upf-builder /etc/rhsm /etc/rhsm
# We install some debug tools for the moment in addition of mandatory libraries
RUN rm -f /etc/rhsm-host && \
microdnf update -y && \
......
......@@ -22,23 +22,15 @@ kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: "upf-build-cfg"
namespace: oaicicd-core
spec:
runPolicy: "Serial"
nodeSelector:
node-role.kubernetes.io/worker: ""
source:
type: "Binary"
secrets:
- secret:
name: etc-pki-entitlement
destinationDir: etc-pki-entitlement
configMaps:
- configMap:
name: rhsm-conf
destinationDir: rhsm-conf
- configMap:
name: rhsm-ca
destinationDir: rhsm-ca
strategy:
dockerStrategy:
dockerfilePath: "docker/Dockerfile.upf.rhel9"
......
common-src @ 548d8812
Subproject commit a0d333dcdc9c504aafeef85086c8cbd0935c497e
Subproject commit 548d88125b345920cbeee4c9db7cccbeaa6579ce
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