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

Multibranch scm variable not accessible from non-main scripts

      See PR 198 for details. Intuitively you would expect the scm global variable to be defined in all loaded code, but it is only available from the main script, and there is no straightforward way for other CpsScript instances to get it.

      Need to find a way to make global variables reliably be accessible from all script files loaded in a flow build. Current idea is to save them in CpsThreadGroup.

          [JENKINS-30222] Multibranch scm variable not accessible from non-main scripts

          Jesse Glick created issue -
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 198 (Web Link)" [ 13135 ]

          Code changed in jenkins
          User: Jesse Glick
          Path:
          multibranch/src/test/java/org/jenkinsci/plugins/workflow/multibranch/SCMBinderTest.java
          http://jenkins-ci.org/commit/workflow-plugin/2394bf99cb8c0b18181edc75c41059ab8158df65
          Log:
          Merge pull request #198 from jglick/multibranch-globalVariable

          JENKINS-30222 Multibranch/global var incompatibility

          Compare: https://github.com/jenkinsci/workflow-plugin/compare/c1699b7e924f...2394bf99cb8c

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: multibranch/src/test/java/org/jenkinsci/plugins/workflow/multibranch/SCMBinderTest.java http://jenkins-ci.org/commit/workflow-plugin/2394bf99cb8c0b18181edc75c41059ab8158df65 Log: Merge pull request #198 from jglick/multibranch-globalVariable JENKINS-30222 Multibranch/global var incompatibility Compare: https://github.com/jenkinsci/workflow-plugin/compare/c1699b7e924f...2394bf99cb8c
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-27295 [ JENKINS-27295 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-30390 [ JENKINS-30390 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-30414 [ JENKINS-30414 ]
          Jesse Glick made changes -
          Link Original: This issue is related to JENKINS-30390 [ JENKINS-30390 ]
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-29922 [ JENKINS-29922 ]
          Jesse Glick made changes -
          Labels Original: groovy New: groovy multibranch
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-30531 [ JENKINS-30531 ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: