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

BUILD_NUMBER and probably other variables are cached

      Simple script:
      out.println("${BUILD_NUMBER}")

      Print always the same number of a build. It changes only if the script will be redeployed.

          [JENKINS-34056] BUILD_NUMBER and probably other variables are cached

          Code changed in jenkins
          User: Hao
          Path:
          src/main/java/com/orctom/jenkins/plugin/globalpostscript/ScriptContentLoader.java
          http://jenkins-ci.org/commit/global-post-script-plugin/b4bc2e72cee147614bf3a80fa443e02b628b7392
          Log:
          JENKINS-34056 not to resolve variables since the script content is cached

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Hao Path: src/main/java/com/orctom/jenkins/plugin/globalpostscript/ScriptContentLoader.java http://jenkins-ci.org/commit/global-post-script-plugin/b4bc2e72cee147614bf3a80fa443e02b628b7392 Log: JENKINS-34056 not to resolve variables since the script content is cached

          Hao CHEN added a comment -

          My bad, I treated out.println("${VARIABLE}") and out.println VARIABLE diferently.
          I did a variable resolving before caching, so the formal one becomes something like out.println('#67') and been cached.

          Thanks for catching it up!
          The fix is in version 1.1.1.1. (It takes a few hours to show up in the update center)

          Hao CHEN added a comment - My bad, I treated out.println("${VARIABLE}") and out.println VARIABLE diferently. I did a variable resolving before caching, so the formal one becomes something like out.println('#67') and been cached. Thanks for catching it up! The fix is in version 1.1.1.1 . (It takes a few hours to show up in the update center)

          Hao CHEN added a comment -

          Thanks and please check it out in a few hours.

          Hao CHEN added a comment - Thanks and please check it out in a few hours.

          Michał Buda added a comment -

          Version 1.1.1.1 works. Thanks

          Michał Buda added a comment - Version 1.1.1.1 works. Thanks

            michbu1 Michał Buda
            michbu1 Michał Buda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: