Skip to content
Snippets Groups Projects
Commit 8a85dd3c authored by Sagar Arora's avatar Sagar Arora :bicyclist_tone1:
Browse files

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

parent e90ff2ae
No related branches found
No related tags found
1 merge request!74chore(ci): changing entitlement creation processes for openshift 4.17 and updating submodules
Pipeline #51371 passed
Subproject commit 0968c25ea2414dac69181dc57a23ee17848c3111 Subproject commit 57ec65dc9feb53cf673169a23a1a0e1ba476415c
...@@ -54,6 +54,12 @@ DH_Account = "oaisoftwarealliance" ...@@ -54,6 +54,12 @@ DH_Account = "oaisoftwarealliance"
// Private Local Registry URL // Private Local Registry URL
PrivateRegistryURL = 'selfix.sboai.cs.eurecom.fr' 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 start
pipeline { pipeline {
...@@ -223,8 +229,9 @@ pipeline { ...@@ -223,8 +229,9 @@ pipeline {
withCredentials([ withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${rhelOcCredentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password'] [$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 project ${Namespace}"
sh "oc delete istag oai-nrf:${nrf_tag} || true" sh "oc delete istag oai-nrf:${nrf_tag} || true"
// Copy the RHEL Host certificates for building // Copy the RHEL Host certificates for building
sh "./ci-scripts/common/python/recreate_entitlement.py" sh "./ci-scripts/common/python/recreate_entitlement.py"
...@@ -236,7 +243,7 @@ pipeline { ...@@ -236,7 +243,7 @@ pipeline {
// need python to wait for pod nrf-build-cfg-1-build to be Completed or Error // need python to wait for pod nrf-build-cfg-1-build to be Completed or Error
// it fails if it detects error or timeout at 20 minutes // it fails if it detects error or timeout at 20 minutes
sh "./ci-scripts/common/python/check_build_pod_status.py --pod-name nrf-build-cfg-1-build --log-file archives/nrf_rhel_image_build.log" sh "./ci-scripts/common/python/check_build_pod_status.py --pod-name nrf-build-cfg-1-build --log-file archives/nrf_rhel_image_build.log"
sh "oc describe istag oai-nrf:${nrf_tag} | grep 'Image Size:' >> archives/nrf_rhel_image_build.log" sh "oc describe istag oai-nrf:${nrf_tag} -n ${Namespace} | grep 'Image Size:' >> archives/nrf_rhel_image_build.log"
} }
} }
} }
...@@ -250,7 +257,7 @@ pipeline { ...@@ -250,7 +257,7 @@ pipeline {
} }
cleanup { cleanup {
script { script {
sh "oc delete build nrf-build-cfg-1 || true" sh "oc delete bc nrf-build-cfg -n ${Namespace} || true"
sh "oc logout || true" sh "oc logout || true"
stash allowEmpty: true, includes: 'archives/nrf_rhel_image_build.log', name: 'rhelBuildLog' stash allowEmpty: true, includes: 'archives/nrf_rhel_image_build.log', name: 'rhelBuildLog'
} }
......
Subproject commit 0a944b75fcd2a87c7831ed89a266061b9bae6531 Subproject commit 382e158f4ba0c40db45d271692ce3f6b6f3b5018
...@@ -36,10 +36,6 @@ ENV IS_DOCKERFILE=1 ...@@ -36,10 +36,6 @@ ENV IS_DOCKERFILE=1
# Copy the entitlements # Copy the entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement 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 -f /etc/rhsm-host && \ RUN rm -f /etc/rhsm-host && \
subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms && \ subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms && \
dnf update -y && \ dnf update -y && \
...@@ -70,8 +66,7 @@ RUN ./build_nrf --clean --Verbose --build-type Release --jobs && \ ...@@ -70,8 +66,7 @@ RUN ./build_nrf --clean --Verbose --build-type Release --jobs && \
ldd /openair-nrf/build/nrf/build/nrf && \ ldd /openair-nrf/build/nrf/build/nrf && \
mv /openair-nrf/build/nrf/build/nrf /openair-nrf/build/nrf/build/oai_nrf && \ mv /openair-nrf/build/nrf/build/nrf /openair-nrf/build/nrf/build/oai_nrf && \
# Remove entitlements and Subscription Manager configs # Remove entitlements and Subscription Manager configs
rm -rf /etc/pki/entitlement && \ rm -rf /etc/pki/entitlement
rm -rf /etc/rhsm
FROM mikefarah/yq:latest as yq-source FROM mikefarah/yq:latest as yq-source
...@@ -83,10 +78,8 @@ ENV TZ=Europe/Paris ...@@ -83,10 +78,8 @@ ENV TZ=Europe/Paris
# Copy the entitlements # Copy the entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement COPY ./etc-pki-entitlement /etc/pki/entitlement
# Copy the subscription manager configurations # Copy the subscription manager configurations
COPY ./rhsm-conf /etc/rhsm COPY --from=oai-nrf-builder /etc/rhsm /etc/rhsm
COPY ./rhsm-ca /etc/rhsm/ca
# We install some debug tools for the moment in addition of mandatory libraries # We install some debug tools for the moment in addition of mandatory libraries
RUN rm -f /etc/rhsm-host && \ RUN rm -f /etc/rhsm-host && \
......
...@@ -22,23 +22,15 @@ kind: BuildConfig ...@@ -22,23 +22,15 @@ kind: BuildConfig
apiVersion: build.openshift.io/v1 apiVersion: build.openshift.io/v1
metadata: metadata:
name: "nrf-build-cfg" name: "nrf-build-cfg"
namespace: oaicicd-core
spec: spec:
runPolicy: "Serial" runPolicy: "Serial"
nodeSelector:
node-role.kubernetes.io/worker: ""
source: source:
type: "Binary" type: "Binary"
secrets: secrets:
- secret: - secret:
name: etc-pki-entitlement name: etc-pki-entitlement
destinationDir: etc-pki-entitlement destinationDir: etc-pki-entitlement
configMaps:
- configMap:
name: rhsm-conf
destinationDir: rhsm-conf
- configMap:
name: rhsm-ca
destinationDir: rhsm-ca
strategy: strategy:
dockerStrategy: dockerStrategy:
dockerfilePath: "docker/Dockerfile.nrf.rhel9" dockerfilePath: "docker/Dockerfile.nrf.rhel9"
......
Subproject commit 57571be6db8deba515f473b7cd4514c84cb57d3a Subproject commit 548d88125b345920cbeee4c9db7cccbeaa6579ce
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment