]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-release-pipeline: use @Field for top-level variables 2650/head
authorDavid Galloway <david.galloway@ibm.com>
Thu, 9 Jul 2026 14:43:12 +0000 (10:43 -0400)
committerDavid Galloway <david.galloway@ibm.com>
Thu, 9 Jul 2026 14:43:12 +0000 (10:43 -0400)
SCRIPT_SPLITTING_TRANSFORMATION (JENKINS-37984) is enabled on
jenkins.ceph.com to keep ceph-dev-pipeline under the JVM 64KB method
limit. That flag rejects Declarative pipelines with script-level local
variable declarations, so ceph-release-pipeline failed to compile:

  General error during semantic analysis: [JENKINS-37984]
  SCRIPT_SPLITTING_TRANSFORMATION is ... incompatible with local
  variable declarations inside a Jenkinsfile.

Annotate the cross-stage variables with @Field, same as was done for
ceph-dev-pipeline-trigger in c898b349. Audited all other Declarative
Jenkinsfiles in the repo; no other job has script-level variable
declarations.

Signed-off-by: David Galloway <david.galloway@ibm.com>
ceph-release-pipeline/build/Jenkinsfile

index 9af3331f3524d2ea2ead5c0b688d4fae43794c01..ab10d066a5b8527552307ca24401940afd81a2af 100644 (file)
@@ -1,7 +1,15 @@
-// Global variables to use across stages
-def CEPH_TAG_CREATE_JOB_ID, CEPH_TAG_CREATE_JOB_URL
-def PACKAGE_BUILD_ID, PACKAGE_BUILD_URL
-def CEPH_TAG_PUSH_JOB_ID, CEPH_TAG_PUSH_JOB_URL
+import groovy.transform.Field
+
+// Global variables to use across stages.
+// @Field is required because SCRIPT_SPLITTING_TRANSFORMATION is enabled on
+// jenkins.ceph.com (JENKINS-37984); plain script-level 'def' declarations
+// fail compilation with it.
+@Field def CEPH_TAG_CREATE_JOB_ID
+@Field def CEPH_TAG_CREATE_JOB_URL
+@Field def PACKAGE_BUILD_ID
+@Field def PACKAGE_BUILD_URL
+@Field def CEPH_TAG_PUSH_JOB_ID
+@Field def CEPH_TAG_PUSH_JOB_URL
 
 pipeline {
   agent any