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

Enivronment is not separated

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The environment variables still spreads around the jobs. Try the following:

      • Configure a maven job
      • Use the Inject "Inject environment variables to the build process" checkbox and write something into the "Properties Content" box
      • Start the job

      You will notice the following (during the run of the maven job)

      • Start a free style job that prints all environment variables
      • It will print the injected variables from the maven job
      • Configure another maven job
      • Use the same injection method and the same variable to be injected
      • Start the job

      If the first job is still running, it will adept the environment from the second maven job!

        Attachments

          Activity

          Hide
          gbois Gregory Boissinot added a comment -

          You're right.
          The current version of the envInject plugin doesn't allow Jenkins to set an environment in isolation between jobs.

          It's quite difficult to resolve this.
          Waiting for the fix, I suggest running the jobs in different slave.

          Show
          gbois Gregory Boissinot added a comment - You're right. The current version of the envInject plugin doesn't allow Jenkins to set an environment in isolation between jobs. It's quite difficult to resolve this. Waiting for the fix, I suggest running the jobs in different slave.
          Hide
          leovonklenze leovonklenze added a comment -

          I'm going with the envfile plugin now. This has the disadvantage that it allows only a file for defining environment variables.

          But it seems that it clearly seperates the jobs. Maybe you want to have a look at the source code of this plugin.

          Show
          leovonklenze leovonklenze added a comment - I'm going with the envfile plugin now. This has the disadvantage that it allows only a file for defining environment variables. But it seems that it clearly seperates the jobs. Maybe you want to have a look at the source code of this plugin.
          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/EnvInjectBuildWrapper.java
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectBuilder.java
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectJobProperty.java
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java
          src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectJobProperty/config.jelly
          src/main/webapp/help-buildWrapper.html
          src/main/webapp/help.html
          http://jenkins-ci.org/commit/envinject-plugin/899abfa8d6f607dabaa210a61801be764d4359a9
          Log:
          Fixed partially JENKINS-10847

          Compare: https://github.com/jenkinsci/envinject-plugin/compare/51aa70d...899abfa

          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/EnvInjectBuildWrapper.java src/main/java/org/jenkinsci/plugins/envinject/EnvInjectBuilder.java src/main/java/org/jenkinsci/plugins/envinject/EnvInjectJobProperty.java src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectJobProperty/config.jelly src/main/webapp/help-buildWrapper.html src/main/webapp/help.html http://jenkins-ci.org/commit/envinject-plugin/899abfa8d6f607dabaa210a61801be764d4359a9 Log: Fixed partially JENKINS-10847 Compare: https://github.com/jenkinsci/envinject-plugin/compare/51aa70d...899abfa

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              leovonklenze leovonklenze
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: