Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38795

global variables are not global singletons

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • Jenkins 2.24
      cps-global-lib 2.3

      Similar to JENKINS-34416 (and might be another bad examples interpretation), having several global classes, an invocation from the Jenkinsfile makes a different object than a invocation from another class.

      Running a job with https://github.com/witokondoria/jenkins-multibranch-test as implicitly loaded global library and running the same repo Jenkinsfile, the job console output shows two different objects for invocations from Jenkinsfile:7 and closure vars.flow:24

      Might be related to this, action.otherAction() cant be invoked from within the Jenkinsfile (replacing Jenkinsfile:7)

            Unassigned Unassigned
            witokondoria Javier Delgado
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: