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

global variable not updated

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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 ?

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Gregory Boissinot
            Path:
            src/main/java/org/jenkinsci/plugins/envinject/EnvInjectComputerListener.java
            http://jenkins-ci.org/commit/envinject-plugin/3371ed7601431b57780a30ddea4b84dd27e38b6e
            Log:
            Merge pull request #20 from jglick/sticky-var-JENKINS-16316

            JENKINS-16316 Changes to global variables not honored.

            Compare: https://github.com/jenkinsci/envinject-plugin/compare/b5cc29fc9695...3371ed760143

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/envinject/EnvInjectComputerListener.java http://jenkins-ci.org/commit/envinject-plugin/3371ed7601431b57780a30ddea4b84dd27e38b6e Log: Merge pull request #20 from jglick/sticky-var- JENKINS-16316 JENKINS-16316 Changes to global variables not honored. Compare: https://github.com/jenkinsci/envinject-plugin/compare/b5cc29fc9695...3371ed760143
            Hide
            walterk82 Walter Kacynski added a comment -

            Upgrading to 1.88 has fixed the problem for me as well.

            Show
            walterk82 Walter Kacynski added a comment - Upgrading to 1.88 has fixed the problem for me as well.
            Hide
            guyshaanan Guy Shaanan added a comment -

            Not sure if it is the same bug or a new one:
            When you have a build parameter, and you try to inject a value to it, the value is not injected.

            Ways to reproduce:
            JOB #1
            ----------
            1. Add build parameter called BRANCH (or whatever name you like)
            2. Add shell script with echo "BRANCH=test" > build.prop
            3. Inject build.prop using the envinject plugin
            4. echo ${BRANCH}
            >> this echos blank value (or the default value set to parameter) instead of "test"

            JOB #2
            -----------
            1. remove the parameter named BRANCH.
            Rest of the steps (2-4) remain the same:
            2. Add shell script with echo "BRANCH=test" > build.prop
            3. Inject build.prop using the envinject plugin
            4. echo ${BRANCH}
            >> this echos "test"

            We've upgraded Jenkins to 1.584 and envinject plugin to 1.90 and this behavior happens.

            Job #1 and Job #2 should both echo "test" to the screen.

            This was working before the upgrade we did (I don't remember which plugin version we had previously).

            Thanks.

            Show
            guyshaanan Guy Shaanan added a comment - Not sure if it is the same bug or a new one: When you have a build parameter, and you try to inject a value to it, the value is not injected. Ways to reproduce: JOB #1 ---------- 1. Add build parameter called BRANCH (or whatever name you like) 2. Add shell script with echo "BRANCH=test" > build.prop 3. Inject build.prop using the envinject plugin 4. echo ${BRANCH} >> this echos blank value (or the default value set to parameter) instead of "test" JOB #2 ----------- 1. remove the parameter named BRANCH. Rest of the steps (2-4) remain the same: 2. Add shell script with echo "BRANCH=test" > build.prop 3. Inject build.prop using the envinject plugin 4. echo ${BRANCH} >> this echos "test" We've upgraded Jenkins to 1.584 and envinject plugin to 1.90 and this behavior happens. Job #1 and Job #2 should both echo "test" to the screen. This was working before the upgrade we did (I don't remember which plugin version we had previously). Thanks.
            Hide
            jglick Jesse Glick added a comment -

            Guy Shaanan:

            Not sure if it is the same bug or a new one

            Then file a new bug report, and link it to this one as possibly related.

            Show
            jglick Jesse Glick added a comment - Guy Shaanan : Not sure if it is the same bug or a new one Then file a new bug report, and link it to this one as possibly related.
            Hide
            bikrambora Bikram Bora added a comment -

            Issue still occuring on 1.92.1

            Had to revert to 1.88 to get it working

            Seems like there is a toss up between ->
            1. people using it on master (like me to inject variables during a build)
            2. people using it on nodes to set up the environment at the beginning.

            When one feature works the other seems to fail

            for usage 1 -> 1.88 works perfectly
            for usage 2 -> 1.92.1 seems to work

            Maybe fork the plugin into two separate plugins

            Show
            bikrambora Bikram Bora added a comment - Issue still occuring on 1.92.1 Had to revert to 1.88 to get it working Seems like there is a toss up between -> 1. people using it on master (like me to inject variables during a build) 2. people using it on nodes to set up the environment at the beginning. When one feature works the other seems to fail for usage 1 -> 1.88 works perfectly for usage 2 -> 1.92.1 seems to work Maybe fork the plugin into two separate plugins

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                ndeloof Nicolas De Loof
              • Votes:
                4 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: