From: Zack Cerza Date: Fri, 25 Jul 2025 16:40:53 +0000 (-0600) Subject: ceph-dev-pipeline: Consume SHA1 parameter X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2412%2Fhead;p=ceph-build.git ceph-dev-pipeline: Consume SHA1 parameter If SHA1 is passed, ensure it is reflected in the consumed artifact. Signed-off-by: Zack Cerza --- diff --git a/ceph-dev-pipeline/build/Jenkinsfile b/ceph-dev-pipeline/build/Jenkinsfile index 7bbd8cb4b..1266444dc 100644 --- a/ceph-dev-pipeline/build/Jenkinsfile +++ b/ceph-dev-pipeline/build/Jenkinsfile @@ -146,6 +146,7 @@ pipeline { parameters: [ string(name: "BRANCH", value: env.BRANCH), // Below are just for ceph-source-dist + string(name: "SHA1", value: env.SHA1), string(name: "CEPH_REPO", value: env.CEPH_REPO), string(name: "CEPH_BUILD_BRANCH", value: env.CEPH_BUILD_BRANCH), ] @@ -263,9 +264,13 @@ pipeline { ) } script { + def sha1_trimmed = env.SHA1.trim().toLowerCase() def sha1_props = readProperties file: "${WORKSPACE}/dist/sha1" - env.SHA1 = sha1_props.SHA1 - println "SHA1=${env.SHA1}" + sha1_from_artifact = sha1_props.SHA1.trim().toLowerCase() + if ( env.SHA1 && sha1_from_artifact != sha1_trimmed ) { + error message: "SHA1 from artifact (${sha1_from_artifact}) does not match parameter value (${sha1_trimmed})" + } + println "SHA1=${sha1_trimmed}" env.VERSION = readFile(file: "${WORKSPACE}/dist/version").trim() def shaman_url = "https://shaman.ceph.com/builds/ceph/${env.BRANCH}/${env.SHA1}" def build_description = """\ diff --git a/ceph-dev-pipeline/config/definitions/ceph-dev-pipeline.yml b/ceph-dev-pipeline/config/definitions/ceph-dev-pipeline.yml index 48b041e38..2995d087a 100644 --- a/ceph-dev-pipeline/config/definitions/ceph-dev-pipeline.yml +++ b/ceph-dev-pipeline/config/definitions/ceph-dev-pipeline.yml @@ -24,6 +24,10 @@ description: "The git branch (or tag) to build" default: main + - string: + name: SHA1 + description: "The specific commit to build" + - choice: name: CEPH_REPO choices: