From: David Galloway Date: Tue, 7 Jul 2026 13:41:27 +0000 (-0400) Subject: ceph-dev-pipeline-trigger: use @Field for top-level variable X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c898b34939c75212b42310ee4802fd5f36b21ffe;p=ceph-build.git ceph-dev-pipeline-trigger: use @Field for top-level variable The Declarative script splitting transformation being enabled on the controller rejects pipelines that declare top-level local variables. Convert the params list to a @Field, renamed to build_params to avoid clobbering Jenkins pipeline's 'params' predefined global variable. Signed-off-by: David Galloway --- diff --git a/ceph-dev-pipeline-trigger/build/Jenkinsfile b/ceph-dev-pipeline-trigger/build/Jenkinsfile index 3a19e8f3e..32604acce 100644 --- a/ceph-dev-pipeline-trigger/build/Jenkinsfile +++ b/ceph-dev-pipeline-trigger/build/Jenkinsfile @@ -1,3 +1,5 @@ +import groovy.transform.Field + JOB = "ceph-dev-pipeline" VALID_PARAMETERS = [ "CEPH_BUILD_BRANCH", @@ -10,7 +12,7 @@ VALID_PARAMETERS = [ "FLAVOR", "SCCACHE", ] -def params = [] +@Field List build_params = [] pipeline { agent any @@ -33,12 +35,12 @@ pipeline { } } def branch = env.ref.replace("refs/heads/", "") - params.push(string(name: "BRANCH", value: branch)) + build_params.push(string(name: "BRANCH", value: branch)) println("Looking for parameters: ${VALID_PARAMETERS}") for (key in VALID_PARAMETERS) { value = paramsMap[key] if ( value ) { - params.push(string(name: key, value: value)) + build_params.push(string(name: key, value: value)) println("${key}=${value}") } } @@ -50,7 +52,7 @@ pipeline { script { build( job: JOB, - parameters: params + parameters: build_params ) } }