From a8b9533570fb6d7eaad5b61a6d7ef6c1416e1fbe Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 23 Dec 2024 14:12:00 -0700 Subject: [PATCH] ceph-dev-pipeline: build container separately Signed-off-by: Zack Cerza --- ceph-dev-pipeline/build/Jenkinsfile | 31 +++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/ceph-dev-pipeline/build/Jenkinsfile b/ceph-dev-pipeline/build/Jenkinsfile index c462a4ad..f22bbeb6 100644 --- a/ceph-dev-pipeline/build/Jenkinsfile +++ b/ceph-dev-pipeline/build/Jenkinsfile @@ -106,13 +106,10 @@ pipeline { environment { CHACRACTL_KEY = credentials('chacractl-key') SHAMAN_API_KEY = credentials('shaman-api-key') - CONTAINER_REPO_CREDS = credentials('quay-ceph-io-ceph-ci') SCCACHE_BUCKET_CREDS = credentials('ibm-cloud-sccache-bucket') } steps { script { - env.CONTAINER_REPO_USERNAME = env.CONTAINER_REPO_CREDS_USR - env.CONTAINER_REPO_PASSWORD = env.CONTAINER_REPO_CREDS_PSW env.AWS_ACCESS_KEY_ID = env.SCCACHE_BUCKET_CREDS_USR env.AWS_SECRET_ACCESS_KEY = env.SCCACHE_BUCKET_CREDS_PSW def props = readProperties file: "${WORKSPACE}/dist/other_envvars" @@ -160,7 +157,33 @@ pipeline { throw new Exception("DIST '${env.DIST}' is invalid!") } } - sh "command -v sccache && sccache --show-adv-stats || true" + } + } + stage("container") { + when { + environment name: "CI_CONTAINER", value: "true" + environment name: "DIST", value: "centos9" + } + environment { + CONTAINER_REPO_CREDS = credentials('quay-ceph-io-ceph-ci') + } + steps { + script { + env.CONTAINER_REPO_USERNAME = env.CONTAINER_REPO_CREDS_USR + env.CONTAINER_REPO_PASSWORD = env.CONTAINER_REPO_CREDS_PSW + env.DISTRO = sh( + script: '. /etc/os-release && echo -n $ID', + returnStdout: true, + ) + env.RELEASE = sh( + script: '. /etc/os-release && echo -n $VERSION_ID', + returnStdout: true, + ) + env.cephver = env.VERSION.trim() + sh '''#!/bin/bash + ./scripts/build_container + ''' + } } } } -- 2.39.5