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

BUILD_NUMBER and probably other variables are cached

    Details

    • Similar Issues:

      Description

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

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

        Attachments

          Activity

          michbu1 Michał Buda created issue -
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          orctom 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)

          Show
          orctom 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)
          Hide
          orctom Hao CHEN added a comment -

          Thanks and please check it out in a few hours.

          Show
          orctom Hao CHEN added a comment - Thanks and please check it out in a few hours.
          orctom Hao CHEN made changes -
          Field Original Value New Value
          Assignee Hao CHEN [ orctom ] Michał Buda [ michbu1 ]
          Hide
          michbu1 Michał Buda added a comment -

          Version 1.1.1.1 works. Thanks

          Show
          michbu1 Michał Buda added a comment - Version 1.1.1.1 works. Thanks
          michbu1 Michał Buda made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 170076 ] JNJira + In-Review [ 198780 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: