• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • envinject-plugin
    • None

      Update to global variable aren't applied to jobs when envinject plugin is installed

      how to reproduce :
      running fresh 1.494, with a single Job to echo $FOO
      FOO global variable set to "foo"

      build #1 :
      echo foo

      change FOO to set value = "bar"

      build #2 :
      echo bar

      Right, then install envinject (1.78), restart

      build #3 :
      echo bar

      change FOO to set value = "qix"

      build #2 :
      echo bar

      wtf ?

          [JENKINS-16316] global variable not updated

          Nicolas De Loof created issue -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectNodeProperty.java
          src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectGlobalPasswordRetriever.java
          http://jenkins-ci.org/commit/envinject-plugin/95428b2fb1a750c2a1d3e7898f14c3d95b77e481
          Log:
          Fix JENKINS-16316

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/envinject/EnvInjectNodeProperty.java src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectGlobalPasswordRetriever.java http://jenkins-ci.org/commit/envinject-plugin/95428b2fb1a750c2a1d3e7898f14c3d95b77e481 Log: Fix JENKINS-16316
          Nicolas De Loof made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          still failing

          Nicolas De Loof added a comment - still failing
          Nicolas De Loof made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

          Can't reproduce

          Gregory Boissinot added a comment - Can't reproduce

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectComputerListener.java
          src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectEnvVars.java
          http://jenkins-ci.org/commit/envinject-plugin/9e27cf40040a15cf67c1fc64bab90d28f2bc43e4
          Log:
          Fix reopen JENKINS-16316


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/envinject/EnvInjectComputerListener.java src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectEnvVars.java http://jenkins-ci.org/commit/envinject-plugin/9e27cf40040a15cf67c1fc64bab90d28f2bc43e4 Log: Fix reopen JENKINS-16316 – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
          Gregory Boissinot made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]

          I've encountered this to still be an issue in specific cases on slave node execution (maybe some of this behaviour is intended?):

          how to reproduce:

          • hpi:run on current head with jenkins-version set to "1.480.3" (current LTS verison)
          • configure a global property on master K/V: TESTVAR/value1
          • configure a slave and start it
          • configure a job restricted to run on that slave and to echo $TESTVAR.
          • run the job (it will echo "value1")
          • configure the global property on master to be: TESTVAR/value2
          • dont restart anything
          • rerun the job (it will still echo "value1")

          however a job on master will recognize the changed value.

          there are 2 pieces of code that lead to this behaviour. I'm pretty uncertain about the fix i made, but it resolves at least our problem with the plugin as i described it above, although i'm pretty sure it breaks some other intended feature.

          https://github.com/kazesberger/envinject-plugin.git
          https://github.com/kazesberger/envinject-plugin/commits/master

          maybe someone can have a look at it and/or tell me what's the story behind this (Core)EnvironmentContributor thing.

          Klaus Azesberger added a comment - I've encountered this to still be an issue in specific cases on slave node execution (maybe some of this behaviour is intended?): how to reproduce: hpi:run on current head with jenkins-version set to "1.480.3" (current LTS verison) configure a global property on master K/V: TESTVAR/value1 configure a slave and start it configure a job restricted to run on that slave and to echo $TESTVAR. run the job (it will echo "value1") configure the global property on master to be: TESTVAR/value2 dont restart anything rerun the job (it will still echo "value1") however a job on master will recognize the changed value. there are 2 pieces of code that lead to this behaviour. I'm pretty uncertain about the fix i made, but it resolves at least our problem with the plugin as i described it above, although i'm pretty sure it breaks some other intended feature. https://github.com/kazesberger/envinject-plugin.git https://github.com/kazesberger/envinject-plugin/commits/master maybe someone can have a look at it and/or tell me what's the story behind this (Core)EnvironmentContributor thing.
          Klaus Azesberger made changes -
          Assignee Original: Gregory Boissinot [ gbois ]
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            Unassigned Unassigned
            ndeloof Nicolas De Loof
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: